aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-05-15 23:25:59 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-05-27 21:59:51 +0800
commit6124cbdcfaab134a066e67706c92c8f01b4e13ff (patch)
treec133183e99fff985b857dfbf3194ad2af85637fb
parent430523931544d82be9bbd0960c44a4b2f1452ac8 (diff)
downloadffmpeg-6124cbdcfaab134a066e67706c92c8f01b4e13ff.tar.gz
avcodec/adpcmenc: Add FF_CODEC_CAP_INIT_CLEANUP
then we can remove adpcm_encode_close() in adpcm_encode_init() if have failed. so the goto error lable will be unnecessary and can be removed later. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r--libavcodec/adpcmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 668939c778..1c8456126e 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -146,7 +146,6 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
return 0;
error:
- adpcm_encode_close(avctx);
return ret;
}
@@ -717,6 +716,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \
.sample_fmts = sample_fmts_, \
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
}
ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, sample_fmts_p, "ADPCM IMA QuickTime");