vlc | branch: master | Steve Lhomme <[email protected]> | Tue May 31 15:06:19 
2016 +0200| [ac7d450ad01e555b959667b2c29312402436b56a] | committer: 
Jean-Baptiste Kempf

win32: only sleep for 0 ms when excplicitly requested

SleepEx(0) results in 100% CPU usage on XP. It's back to normal with a 5 ms
value.

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 src/win32/thread.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/win32/thread.c b/src/win32/thread.c
index 632d3e0..963a8d7 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -314,7 +314,7 @@ static BOOL WINAPI 
SleepConditionVariableFallback(CONDITION_VARIABLE *cv,
 {
     (void) cv;
     LeaveCriticalSection(cs);
-    SleepEx(0, TRUE);
+    SleepEx(ms > 5 ? 5 : ms, TRUE);
     EnterCriticalSection(cs);
     return ms != 0;
 }

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

Reply via email to