diff mbox series

[FFmpeg-devel,v4,07/24] avcodec/aacenc: add FF_CODEC_CAP_INIT_CLEANUP

Message ID 1591111618-15778-7-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/aacenc.c    | 3 +--
 libavcodec/iirfilter.c | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index db11e0c..189f5e0 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -1115,7 +1115,6 @@  static av_cold int aac_encode_init(AVCodecContext *avctx)
 
     return 0;
 fail:
-    aac_encode_end(avctx);
     return ret;
 }
 
@@ -1159,7 +1158,7 @@  AVCodec ff_aac_encoder = {
     .close          = aac_encode_end,
     .defaults       = aac_encode_defaults,
     .supported_samplerates = mpeg4audio_sample_rates,
-    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
     .capabilities   = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
                                                      AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c
index b202515..749fa57 100644
--- a/libavcodec/iirfilter.c
+++ b/libavcodec/iirfilter.c
@@ -197,7 +197,6 @@  av_cold struct FFIIRFilterCoeffs *ff_iir_filter_init_coeffs(void *avc,
         return c;
 
 init_fail:
-    ff_iir_filter_free_coeffsp(&c);
     return NULL;
 }