[ffmpeg] avcodec/qsvdec: fix refcount leak in two-stage QSV init (branch master)
This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg. The following commit(s) were added to refs/heads/master by this push: new 991ba3fbac avcodec/qsvdec: fix refcount leak in two-stage QSV init 991ba3fbac is described below commit 991ba3fbac510690f335ba4db62e39ca6f7769b8 Author: hajin-chung <hajinchung1@gmail.com> AuthorDate: Tue Sep 16 17:13:01 2025 +0900 Commit: Zhao Zhili <quink@noreply.code.ffmpeg.org> CommitDate: Wed Dec 31 08:06:48 2025 +0000 avcodec/qsvdec: fix refcount leak in two-stage QSV init The temporary hw_frames_ctx created for header parsing was not being fully released, leading to a leak. Explicitly unreference the temporary context after use to resolve the leak. Signed-off-by: hajin-chung <hajinchung1@gmail.com> --- libavcodec/qsvdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 144cf5b9e9..a85c1785cf 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -202,6 +202,7 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession ses MFXClose(q->internal_qs.session); q->internal_qs.session = NULL; } + av_refstruct_unref(&q->frames_ctx.mids); av_buffer_unref(&q->frames_ctx.hw_frames_ctx); q->frames_ctx.hw_frames_ctx = av_buffer_ref(hw_frames_ref);
participants (1)
-
hajin-chung