diff mbox series

[FFmpeg-devel,v4,05/24] avcodec/apedec: add FF_CODEC_CAP_INIT_CLEANUP

Message ID 1591111618-15778-5-git-send-email-lance.lmwang@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,v4,01/24] avcodec/h264dec: cosmetics
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Limin Wang June 2, 2020, 3:26 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/apedec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 65c07d0..0bee9d8 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -301,7 +301,6 @@  static av_cold int ape_decode_init(AVCodecContext *avctx)
 
     return 0;
 filter_alloc_fail:
-    ape_decode_close(avctx);
     return AVERROR(ENOMEM);
 }
 
@@ -1638,6 +1637,7 @@  AVCodec ff_ape_decoder = {
     .decode         = ape_decode_frame,
     .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
                       AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .flush          = ape_flush,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                       AV_SAMPLE_FMT_S16P,