diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-18 07:21:50 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-28 02:50:40 +0300 |
commit | d07534b5f5f20b4f780f5b0284aca6354da00695 (patch) | |
tree | ad6bacd9f7442198dab1af1a1962a7c65afab707 /libavcodec | |
parent | 83b6471dcb762859f20b2c414decc755fcceb5e8 (diff) |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |