diff options
-rw-r--r-- | player/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c index f16af4528e..7117235852 100644 --- a/player/client.c +++ b/player/client.c @@ -363,7 +363,7 @@ static int wait_wakeup(struct mpv_handle *ctx, int64_t end) pthread_mutex_unlock(&ctx->lock); pthread_mutex_lock(&ctx->wakeup_lock); if (!ctx->need_wakeup) { - struct timespec ts = mp_time_us_to_realtime(end); + struct timespec ts = mp_time_ns_to_realtime(end); r = pthread_cond_timedwait(&ctx->wakeup, &ctx->wakeup_lock, &ts); } if (r == 0) @@ -905,7 +905,7 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout) if (timeout < 0) timeout = 1e20; - int64_t deadline = mp_time_us_add(mp_time_us(), timeout); + int64_t deadline = mp_time_ns_add(mp_time_ns(), timeout); *event = (mpv_event){0}; talloc_free_children(event); |