[vlc-devel] [PATCH 06/14] direct3d11: use D3D11_ReleaseDevice()
Steve Lhomme
robux4 at videolabs.io
Sat Nov 18 14:29:20 CET 2017
---
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");
}
--
2.14.2
More information about the vlc-devel
mailing list