[vlc-commits] direct3d11: use D3D11_ReleaseDevice()

Steve Lhomme git at videolan.org
Mon Nov 20 19:14:02 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Nov 18 14:29:20 2017 +0100| [d0df361e19aa47ec96490926c12d9211a288fa94] | committer: Jean-Baptiste Kempf

direct3d11: use D3D11_ReleaseDevice()

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d0df361e19aa47ec96490926c12d9211a288fa94
---

 modules/video_output/win32/direct3d11.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 9594aa77c3..ceb4d34c4c 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1602,17 +1602,6 @@ static void Direct3D11Close(vout_display_t *vd)
     vout_display_sys_t *sys = vd->sys;
 
     Direct3D11DestroyResources(vd);
-    if (sys->d3d_dev.d3dcontext)
-    {
-        ID3D11DeviceContext_Flush(sys->d3d_dev.d3dcontext);
-        ID3D11DeviceContext_Release(sys->d3d_dev.d3dcontext);
-        sys->d3d_dev.d3dcontext = NULL;
-    }
-    if (sys->d3d_dev.d3ddevice)
-    {
-        ID3D11Device_Release(sys->d3d_dev.d3ddevice);
-        sys->d3d_dev.d3ddevice = NULL;
-    }
     if (sys->dxgiswapChain4)
     {
         IDXGISwapChain_Release(sys->dxgiswapChain4);
@@ -1624,6 +1613,8 @@ static void Direct3D11Close(vout_display_t *vd)
         sys->dxgiswapChain = NULL;
     }
 
+    D3D11_ReleaseDevice( &sys->d3d_dev );
+
     msg_Dbg(vd, "Direct3D11 device adapter closed");
 }
 



More information about the vlc-commits mailing list