diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-27 22:26:20 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-01 01:35:42 +0100 |
commit | 601bb6a739c5073e25d13e6fd6541b72ac905c72 (patch) | |
tree | 20a126890611cd2f3fa63b8810f8e1510bc8274c /libavcodec/mss1.c | |
parent | 80736531da54213a515ff24ca3e929afe214ed0f (diff) | |
download | ffmpeg-601bb6a739c5073e25d13e6fd6541b72ac905c72.tar.gz |
avcodec/mss[12]: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mss1.c')
-rw-r--r-- | libavcodec/mss1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index fb5fc34ea1..5460673133 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -206,7 +206,7 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx) ret = ff_mss12_decode_init(&c->ctx, 0, &c->sc, NULL); if (ret < 0) - av_frame_free(&c->pic); + return ret; avctx->pix_fmt = AV_PIX_FMT_PAL8; @@ -233,4 +233,5 @@ const FFCodec ff_mss1_decoder = { .close = mss1_decode_end, FF_CODEC_DECODE_CB(mss1_decode_frame), .p.capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; |