1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/avcodec: Free frame_thread_encoder on avcodec_open2() error

The frame_thread_encoder has so far not been freed in case an error
happened in avcodec_open2() after ff_frame_thread_encoder_init().
This commit changes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-04-18 06:21:50 +02:00
parent 83b6471dcb
commit d07534b5f5

View File

@ -383,6 +383,8 @@ free_and_end:
avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP)))
avctx->codec->close(avctx);
if (CONFIG_FRAME_THREAD_ENCODER && avci->frame_thread_encoder)
ff_frame_thread_encoder_free(avctx);
if (HAVE_THREADS && avci->thread_ctx)
ff_thread_free(avctx);