[vlc-devel] [PATCH 2/2] win32:thread: keep INFINITE condition wait intact

Steve Lhomme robux4 at gmail.com
Thu May 26 18:21:43 CEST 2016


On Thu, May 26, 2016 at 6:02 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2016-05-26 16:48, Steve Lhomme a écrit :
>>
>> On Thu, May 26, 2016 at 4:44 PM, Rémi Denis-Courmont <remi at remlab.net>
>> wrote:
>>>
>>> Le 2016-05-26 13:02, Steve Lhomme a écrit :
>>>>
>>>>
>>>> ---
>>>>  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 3e942c4..1dbdca6 100644
>>>> --- a/src/win32/thread.c
>>>> +++ b/src/win32/thread.c
>>>> @@ -272,7 +272,7 @@ static int vlc_cond_wait_delay(vlc_cond_t *wait,
>>>> vlc_mutex_t *lock,
>>>>  {
>>>>      if (ms < 0)
>>>>          ms = 0;
>>>> -    if (ms > 0x7fffffff)
>>>> +    if (ms > 0x7fffffff && ms != INFINITE)
>>>>          ms = 0x7fffffff;
>>>
>>>
>>>
>>> What if the requested delay is 4294967295000 microseconds?
>>
>>
>> I think waiting for 49 days in the player can be considered infinite.
>
>
> VLM supports months as a unit, even years, IIRC.

That's above what Windows can provide through SleepEx or
WaitForSingleObjectEx. It uses 32 bits unsigned milliseconds.

>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list