[FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak
Thomas Guillem
thomas at gllm.fr
Thu Dec 2 15:11:36 EET 2021
Reproduced when using the VAAPI va module on VLC 4.0. No leaks when
setting thread count to 1.
---
libavcodec/pthread_frame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 73b1b7d7d9..4c578aa44a 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -747,6 +747,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
av_buffer_unref(&ctx->internal->pool);
av_freep(&ctx->internal);
av_buffer_unref(&ctx->hw_frames_ctx);
+ av_buffer_unref(&ctx->hw_device_ctx);
}
av_frame_free(&p->frame);
--
2.30.2
More information about the ffmpeg-devel
mailing list