summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-06-03 21:53:11 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-06-13 06:59:18 +0800
commit4b2863ff01b1fe93d9a518523c9098d17a9d8c6f (patch)
tree3d22950a39759f7cdc564480a5e4f292cafd3aaf /libavcodec/mpeg12dec.c
parent42a38503600531ee34efbe07c6dffb41a11a5a1d (diff)
downloadffmpeg-4b2863ff01b1fe93d9a518523c9098d17a9d8c6f.tar.gz
avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ff_mpv_common_init()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 99e56532a5..a12857d358 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2873,8 +2873,7 @@ static av_cold int mpeg_decode_end(AVCodecContext *avctx)
{
Mpeg1Context *s = avctx->priv_data;
- if (s->mpeg_enc_ctx_allocated)
- ff_mpv_common_end(&s->mpeg_enc_ctx);
+ ff_mpv_common_end(&s->mpeg_enc_ctx);
av_freep(&s->a53_caption);
return 0;
}
@@ -2891,7 +2890,7 @@ AVCodec ff_mpeg1video_decoder = {
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context),
@@ -2924,7 +2923,7 @@ AVCodec ff_mpeg2video_decoder = {
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles),
@@ -2968,7 +2967,7 @@ AVCodec ff_mpegvideo_decoder = {
.close = mpeg_decode_end,
.decode = mpeg_decode_frame,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
};