[vlc-commits] [Git][videolan/vlc][3.0.x] d3d11_scaler: fix retained context leak

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Aug 3 06:33:46 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
546f8cc7 by junchao.ni at 2026-08-03T05:19:23+00:00
d3d11_scaler: fix retained context leak

D3D11_UpscalerUpdate() AddRefs the context stored in picsys.
Release the final retained reference when destroying the scaler.

Signed-off-by: junchao.ni <junchao.ni at mthreads.com>

- - - - -


1 changed file:

- modules/video_output/win32/d3d11_scaler.cpp


Changes:

=====================================
modules/video_output/win32/d3d11_scaler.cpp
=====================================
@@ -634,6 +634,15 @@ done_super:
 void D3D11_UpscalerDestroy(d3d11_scaler *scaleProc)
 {
     ReleaseSRVs(scaleProc);
+
+    // D3D11_UpscalerUpdate() AddRefs the context stored in picsys.
+    // Release the final retained reference when destroying the scaler.
+    if (scaleProc->picsys.context)
+    {
+        scaleProc->picsys.context->Release();
+        scaleProc->picsys.context = nullptr;
+    }
+
 #ifdef HAVE_AMF_SCALER
     if (scaleProc->amfInput != nullptr)
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/546f8cc7e739b103fa37d4e7e447b5047edbbe25

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/546f8cc7e739b103fa37d4e7e447b5047edbbe25
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list