[vlc-commits] direct3d11: use SleepEx directly instead of vlc_tick_sleep

Steve Lhomme git at videolan.org
Tue Aug 18 13:21:18 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Aug 18 13:17:46 2020 +0200| [dafadf7e76b470d9d8017d4d04aaec758db533ff] | committer: Steve Lhomme

direct3d11: use SleepEx directly instead of vlc_tick_sleep

The Linux check on valid on timer validity doesn't apply here.

(cherry picked from commit 07f1585636db72929d0c0701e0e040cb3a527ee6) (edited)

edited:
- this branch didn't use vlc_tick_sleep

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/video_output/win32/direct3d11.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f5973c4de3..9c6e318abf 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1000,10 +1000,9 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
         while (S_FALSE == ID3D11DeviceContext_GetData(sys->d3d_dev.d3dcontext,
                                                       sys->prepareWait, NULL, 0, 0))
         {
-            const mtime_t render_wait = CLOCK_FREQ / 500; // 2ms
             if (is_d3d11_opaque(picture->format.i_chroma))
                 d3d11_device_unlock( &sys->d3d_dev );
-            msleep( render_wait );
+            SleepEx(2, TRUE);
             if (is_d3d11_opaque(picture->format.i_chroma))
                 d3d11_device_lock( &sys->d3d_dev );
         }



More information about the vlc-commits mailing list