[FFmpeg-cvslog] avcodec/dxa: Cleanup generically after init failure
Andreas Rheinhardt
git at videolan.org
Fri Sep 18 04:10:37 EEST 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Sep 14 02:31:46 2020 +0200| [6d801894865e3a5b2ae661761ecf21f82d7bda9d] | committer: Andreas Rheinhardt
avcodec/dxa: Cleanup generically after init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d801894865e3a5b2ae661761ecf21f82d7bda9d
---
libavcodec/dxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index f6edc03e1a..3f62eac252 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -343,7 +343,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->dsize = avctx->width * avctx->height * 2;
c->decomp_buf = av_malloc(c->dsize + DECOMP_BUF_PADDING);
if (!c->decomp_buf) {
- av_frame_free(&c->prev);
av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
return AVERROR(ENOMEM);
}
@@ -371,4 +370,5 @@ AVCodec ff_dxa_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
More information about the ffmpeg-cvslog
mailing list