Commit e8baa846 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Win32: fix use of WaitForMultipleObjectsEx() (fix #5130)

parent 22c3b97b
...@@ -143,6 +143,7 @@ static DWORD vlc_WaitForSingleObject (HANDLE handle, DWORD delay) ...@@ -143,6 +143,7 @@ static DWORD vlc_WaitForSingleObject (HANDLE handle, DWORD delay)
return vlc_WaitForMultipleObjects (1, &handle, delay); return vlc_WaitForMultipleObjects (1, &handle, delay);
} }
#if 0 // WaitForMultipleObjectsEx() cannot deal with zero handles
static DWORD vlc_Sleep (DWORD delay) static DWORD vlc_Sleep (DWORD delay)
{ {
DWORD ret = vlc_WaitForMultipleObjects (0, NULL, delay); DWORD ret = vlc_WaitForMultipleObjects (0, NULL, delay);
...@@ -150,6 +151,7 @@ static DWORD vlc_Sleep (DWORD delay) ...@@ -150,6 +151,7 @@ static DWORD vlc_Sleep (DWORD delay)
ret = 0; ret = 0;
return ret; return ret;
} }
#endif
/*** Mutexes ***/ /*** Mutexes ***/
...@@ -789,7 +791,7 @@ void mwait (mtime_t deadline) ...@@ -789,7 +791,7 @@ void mwait (mtime_t deadline)
delay /= 1000; delay /= 1000;
if (unlikely(delay > 0x7fffffff)) if (unlikely(delay > 0x7fffffff))
delay = 0x7fffffff; delay = 0x7fffffff;
vlc_Sleep (delay); SleepEx (delay, TRUE);
vlc_testcancel(); vlc_testcancel();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment