avcodec/mpegvideo: Restrict resetting mbskip_table to MPEG-4 decoder

This is done due to invalid input and therefore the encoder is not
affected by it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-04 17:06:31 +02:00
parent 47e43c19cb
commit 3a4e7694a1
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ int ff_mpv_init_context_frame(MpegEncContext *s)
}
if (s->codec_id == AV_CODEC_ID_MPEG4) {
ALLOC_POOL(mbskip_table, mb_array_size + 2,
FF_REFSTRUCT_POOL_FLAG_ZERO_EVERY_TIME);
!s->encoding ? FF_REFSTRUCT_POOL_FLAG_ZERO_EVERY_TIME : 0);
if (!s->encoding) {
/* cbp, pred_dir */
if (!(s->cbp_table = av_mallocz(mb_array_size)) ||