Commit ecabf5dd authored by Laurent Aimar's avatar Laurent Aimar

Fixed vlc_cond_timedwait for win32.

Windows API expect a timeout in millisecond.
SignaObjectAndWait should properly work with a 0 timeout, so try it.
(avoid an invalid lock and an uninitialized return value).
parent d7e6fd9e
......@@ -447,9 +447,10 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
{
vlc_testcancel ();
mtime_t total = deadline - mdate ();
if (total <= 0)
break;
mtime_t total = (deadline - mdate ())/1000;
if( total < 0 )
total = 0;
DWORD delay = (total > 0x7fffffff) ? 0x7fffffff : total;
result = SignalObjectAndWait (*p_mutex, *p_condvar, delay, TRUE);
}
......
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