diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-14 16:57:49 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-19 18:45:03 +0200 |
commit | 42ed9707b5dea6b9d0c05dd796d9dfcab237c95a (patch) | |
tree | 3a300e1279dd15876a522ba2aacef09f2b5d2dee /libavcodec | |
parent | 319dbcf4402978f7a493b81d0f61be7a46ddbeba (diff) | |
download | ffmpeg-42ed9707b5dea6b9d0c05dd796d9dfcab237c95a.tar.gz |
avcodec/flashsv2enc: Cleanup generically after init failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/flashsv2enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index e2a603f312..851abdc822 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c @@ -235,7 +235,6 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx) || !s->current_frame || !s->key_frame || !s->key_blocks || !s->frame_blocks) { av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n"); - cleanup(s); return AVERROR(ENOMEM); } @@ -918,4 +917,5 @@ AVCodec ff_flashsv2_encoder = { .encode2 = flashsv2_encode_frame, .close = flashsv2_encode_end, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; |