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>
avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP)))
avctx->codec->close(avctx);
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);
if (HAVE_THREADS && avci->thread_ctx)
ff_thread_free(avctx);