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

Allow rescheduling a one shot timer from itself

parent 020fbe57
......@@ -823,6 +823,8 @@ static void *vlc_timer_thread (void *data)
if (vlc_cond_timedwait (&timer->reschedule, &timer->lock,
timer->value) == 0)
continue;
if (timer->interval == 0)
timer->value = 0; /* disarm */
vlc_mutex_unlock (&timer->lock);
int canc = vlc_savecancel ();
......@@ -834,10 +836,7 @@ static void *vlc_timer_thread (void *data)
vlc_mutex_lock (&timer->lock);
if (timer->interval == 0)
{
timer->value = 0; /* disarm */
continue;
}
misses = (now - timer->value) / timer->interval;
timer->value += timer->interval;
......
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