[FFmpeg-cvslog] avcodec/avcodec: Free frame_thread_encoder on avcodec_open2() error
Andreas Rheinhardt
git at videolan.org
Wed Apr 28 03:45:46 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Apr 18 06:21:50 2021 +0200| [d07534b5f5f20b4f780f5b0284aca6354da00695] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d07534b5f5f20b4f780f5b0284aca6354da00695
---
libavcodec/avcodec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index a385821375..c4083919bb 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list