diff options
author | wm4 <wm4@nowhere> | 2014-05-18 16:36:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-18 19:20:32 +0200 |
commit | f47a4fc3d900e14653bc059717e2805ad4964a67 (patch) | |
tree | a8ca8944a10c15bbb46239db62a56940a0d3f7b1 /audio/out/push.c | |
parent | e209e44ca2fef86ec2ec5513bbb63d4d68ff97b5 (diff) | |
download | mpv-f47a4fc3d900e14653bc059717e2805ad4964a67.tar.bz2 mpv-f47a4fc3d900e14653bc059717e2805ad4964a67.tar.xz |
threads: use mpv time for mpthread_cond_timedwait wrapper
Use the time as returned by mp_time_us() for mpthread_cond_timedwait(),
instead of calculating the struct timespec value based on a timeout.
This (probably) makes it easier to wait for a specific deadline.
Diffstat (limited to 'audio/out/push.c')
-rw-r--r-- | audio/out/push.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/push.c b/audio/out/push.c index 086536001d..cc37cbf13e 100644 --- a/audio/out/push.c +++ b/audio/out/push.c @@ -274,7 +274,7 @@ static void *playthread(void *arg) MP_STATS(ao, "start audio wait"); pthread_mutex_lock(&p->wakeup_lock); if (!p->need_wakeup) - mpthread_cond_timedwait(&p->wakeup, &p->wakeup_lock, timeout); + mpthread_cond_timedwait_rel(&p->wakeup, &p->wakeup_lock, timeout); p->need_wakeup = false; pthread_mutex_unlock(&p->wakeup_lock); MP_STATS(ao, "end audio wait"); |