diff --git a/src/win32/timer.c b/src/win32/timer.c index e9f78c1b11d5d384ad3c07d15536572ef569172f..4fe3d2b067cbecdc869630cc3e4f1a916b50baf8 100644 --- a/src/win32/timer.c +++ b/src/win32/timer.c @@ -80,9 +80,15 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute, value = 0; } + DWORD val = MS_FROM_VLC_TICK(value); + DWORD interv = MS_FROM_VLC_TICK(interval); + if (val == 0 && value != 0) + val = 1; /* rounding error */ + if (interv == 0 && interval != 0) + interv = 1; /* rounding error */ + if (!CreateTimerQueueTimer(&timer->handle, NULL, vlc_timer_do, timer, - MS_FROM_VLC_TICK(value), - MS_FROM_VLC_TICK(interval), WT_EXECUTEDEFAULT)) + val, interv, WT_EXECUTEDEFAULT)) abort (); }