diff options
author | wm4 <wm4@nowhere> | 2015-05-11 23:44:36 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-15 10:30:15 +0900 |
commit | 37ad3e79dd03cecc4be3a7341fdf69f96873d2eb (patch) | |
tree | ae9e6ec463c69918c334c637901427a94013c017 /misc | |
parent | 328d0c7fc326abce5fc1783e74cdd082c87d4986 (diff) | |
download | mpv-37ad3e79dd03cecc4be3a7341fdf69f96873d2eb.tar.bz2 mpv-37ad3e79dd03cecc4be3a7341fdf69f96873d2eb.tar.xz |
threads: use utility+POSIX functions instead of weird wrappers
There is not much of a reason to have these wrappers around. Use POSIX
standard functions directly, and use a separate utility function to take
care of the timespec calculations. (Course POSIX for using this weird
format for time values.)
(cherry picked from commit 92b9d75d7256be71d8c8b18438af9494b78f0e96)
Diffstat (limited to 'misc')
-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); } |