diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 671c551f29..2736a81efe 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -571,6 +571,8 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count) av_freep(&p->avctx->slice_offset); } + av_buffer_unref(&p->avctx->hw_frames_ctx); + av_freep(&p->avctx->internal); av_freep(&p->avctx); }