summaryrefslogtreecommitdiff
path: root/libavcodec/hnm4video.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 17:48:20 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-19 18:46:53 +0200
commit042af30303ead6a094c6608ca6f5419bb130ce88 (patch)
treecfc3b7c8e665bd7312e163de14d6ce0ff74f8cf0 /libavcodec/hnm4video.c
parent23daf8e67fd842a70b783105025ddb483c036472 (diff)
downloadffmpeg-042af30303ead6a094c6608ca6f5419bb130ce88.tar.gz
avcodec/hnm4video: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/hnm4video.c')
-rw-r--r--libavcodec/hnm4video.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/hnm4video.c b/libavcodec/hnm4video.c
index 177ce1d47a..ac080e398b 100644
--- a/libavcodec/hnm4video.c
+++ b/libavcodec/hnm4video.c
@@ -486,9 +486,6 @@ static av_cold int hnm_decode_init(AVCodecContext *avctx)
|| avctx->width * avctx->height == 0
|| avctx->height % 2) {
av_log(avctx, AV_LOG_ERROR, "av_mallocz() failed\n");
- av_freep(&hnm->buffer1);
- av_freep(&hnm->buffer2);
- av_freep(&hnm->processed);
return AVERROR(ENOMEM);
}
@@ -519,4 +516,5 @@ AVCodec ff_hnm4_video_decoder = {
.close = hnm_decode_end,
.decode = hnm_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};