[vlc-commits] direct3d11: make sure there's no pending operation after leaving Prepare()
Steve Lhomme
git at videolan.org
Thu Apr 13 01:24:53 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Apr 10 16:07:27 2017 +0200| [0299cce50ad3c5e611dea89b21c427d5135ee922] | committer: Jean-Baptiste Kempf
direct3d11: make sure there's no pending operation after leaving Prepare()
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0299cce50ad3c5e611dea89b21c427d5135ee922
---
modules/video_output/win32/direct3d11.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index cf51985ec7..23c27daa2c 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1223,6 +1223,19 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
0, 0, 0, 0,
p_sys->resource[KNOWN_DXGI_INDEX],
p_sys->slice_index, &box);
+ ID3D11DeviceContext_Flush(sys->d3dcontext);
+#if defined(HAVE_ID3D11VIDEODECODER)
+ if ( sys->context_lock != INVALID_HANDLE_VALUE)
+ ReleaseMutex( sys->context_lock );
+#endif
+ } else {
+#if defined(HAVE_ID3D11VIDEODECODER)
+ if( sys->context_lock != INVALID_HANDLE_VALUE )
+ {
+ WaitForSingleObjectEx( sys->context_lock, INFINITE, FALSE );
+ }
+#endif
+ ID3D11DeviceContext_Flush(sys->d3dcontext);
#if defined(HAVE_ID3D11VIDEODECODER)
if ( sys->context_lock != INVALID_HANDLE_VALUE)
ReleaseMutex( sys->context_lock );
More information about the vlc-commits
mailing list