diff options
Diffstat (limited to 'misc/dispatch.c')
-rw-r--r-- | misc/dispatch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/dispatch.c b/misc/dispatch.c index 6391caa063..502742b835 100644 --- a/misc/dispatch.c +++ b/misc/dispatch.c @@ -206,7 +206,8 @@ void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout) } } else { if (wait > 0) { - mpthread_cond_timedwait(&queue->cond, &queue->lock, wait); + struct timespec ts = mp_time_us_to_timespec(wait); + pthread_cond_timedwait(&queue->cond, &queue->lock, &ts); } else { pthread_cond_wait(&queue->cond, &queue->lock); } |