summaryrefslogtreecommitdiff
path: root/libavcodec/dxa.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 02:31:46 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-18 02:51:40 +0200
commit6d801894865e3a5b2ae661761ecf21f82d7bda9d (patch)
treeee61b2236fb04ab74da0c14daf6410040665f247 /libavcodec/dxa.c
parent2fd3ada931ca1580096704541e2ed55d1d8b9e10 (diff)
avcodec/dxa: Cleanup generically after init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/dxa.c')
-rw-r--r--libavcodec/dxa.c2
1 files changed, 1 insertions, 1 deletions
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,
};