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 <[email protected]>
AuthorDate: Tue Sep 16 17:13:01 2025 +0900
Commit: Zhao Zhili <[email protected]>
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 <[email protected]>
---
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);
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]