[vlc-commits] Win32: fix use of WaitForMultipleObjectsEx() (fix #5130)
Rémi Denis-Courmont
git at videolan.org
Thu Jul 28 21:54:39 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 28 22:53:59 2011 +0300| [e8baa846800324065cc51b276d5a4f4ec1074c07] | committer: Rémi Denis-Courmont
Win32: fix use of WaitForMultipleObjectsEx() (fix #5130)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e8baa846800324065cc51b276d5a4f4ec1074c07
---
src/win32/thread.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/win32/thread.c b/src/win32/thread.c
index 1da6020..d93cf28 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -143,6 +143,7 @@ static DWORD vlc_WaitForSingleObject (HANDLE handle, DWORD delay)
return vlc_WaitForMultipleObjects (1, &handle, delay);
}
+#if 0 // WaitForMultipleObjectsEx() cannot deal with zero handles
static DWORD vlc_Sleep (DWORD delay)
{
DWORD ret = vlc_WaitForMultipleObjects (0, NULL, delay);
@@ -150,6 +151,7 @@ static DWORD vlc_Sleep (DWORD delay)
ret = 0;
return ret;
}
+#endif
/*** Mutexes ***/
@@ -789,7 +791,7 @@ void mwait (mtime_t deadline)
delay /= 1000;
if (unlikely(delay > 0x7fffffff))
delay = 0x7fffffff;
- vlc_Sleep (delay);
+ SleepEx (delay, TRUE);
vlc_testcancel();
}
}
More information about the vlc-commits
mailing list