vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Tue Mar 13 
16:55:01 2018 +0100| [572d2a87f6733baf2f6c0dae01b2200497fd7b8b] | committer: 
Steve Lhomme

direct3d11: Lock the device context mutex when presenting the swapchain

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

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

diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index d1d63d0161..b18c84c6c7 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -941,12 +941,14 @@ static void Display(vout_display_t *vd, picture_t 
*picture, subpicture_t *subpic
 
     DXGI_PRESENT_PARAMETERS presentParams;
     memset(&presentParams, 0, sizeof(presentParams));
+    d3d11_device_lock( &sys->d3d_dev );
     HRESULT hr = IDXGISwapChain1_Present1(sys->dxgiswapChain, 0, 0, 
&presentParams);
     if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET)
     {
         /* TODO device lost */
         msg_Dbg(vd, "SwapChain Present failed. (hr=0x%lX)", hr);
     }
+    d3d11_device_unlock( &sys->d3d_dev );
 
     picture_Release(picture);
     if (subpicture)

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to