diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-04 17:06:31 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-12 11:19:39 +0200 |
commit | 3a4e7694a13edc185a00393c2e6872ff3e17756b (patch) | |
tree | 58c1e24085ed32a67eb1f237ff7be91a8cac63db | |
parent | 47e43c19cb50083bf55ea48e4caabc20ca2a8c33 (diff) | |
download | ffmpeg-3a4e7694a13edc185a00393c2e6872ff3e17756b.tar.gz |
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>
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d82a89566c..4b1f882105 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -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)) || |