diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-30 16:04:24 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-02 03:45:40 +0200 |
commit | 5f901211454270f76d7701695fab335c2f127a37 (patch) | |
tree | 3f755018559878053d965986894dd197f616beee /libavcodec | |
parent | 7dffe1dcc0794cb801edecbdf66b441c73ad9029 (diff) | |
download | ffmpeg-5f901211454270f76d7701695fab335c2f127a37.tar.gz |
avcodec/utvideoenc: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utvideoenc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 4ceac26c5d..30d3e33ee7 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -167,7 +167,6 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) if (!avctx->extradata) { av_log(avctx, AV_LOG_ERROR, "Could not allocate extradata.\n"); - utvideo_encode_close(avctx); return AVERROR(ENOMEM); } @@ -176,7 +175,6 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) AV_INPUT_BUFFER_PADDING_SIZE); if (!c->slice_buffer[i]) { av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer 1.\n"); - utvideo_encode_close(avctx); return AVERROR(ENOMEM); } } @@ -664,5 +662,5 @@ const AVCodec ff_utvideo_encoder = { AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE }, - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; |