summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa_common.m2
-rw-r--r--video/out/vo.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 5d5a423fe3..0827da6fc9 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -786,7 +786,7 @@ static void vo_cocoa_resize_redraw(struct vo *vo, int width, int height)
// Wait until a new frame with the new size was rendered. For some reason,
// Cocoa requires this to be done before drawRect() returns.
- struct timespec e = mp_time_us_to_timespec(mp_add_timeout(mp_time_us(), 0.1));
+ struct timespec e = mp_time_us_to_realtime(mp_add_timeout(mp_time_us(), 0.1));
while (s->frame_w != width && s->frame_h != height && s->vo_ready) {
if (pthread_cond_timedwait(&s->wakeup, &s->lock, &e))
break;
diff --git a/video/out/vo.c b/video/out/vo.c
index 7f57df2fe1..23f75e72d5 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -719,7 +719,7 @@ void vo_wait_default(struct vo *vo, int64_t until_time)
pthread_mutex_lock(&in->lock);
if (!in->need_wakeup) {
- struct timespec ts = mp_time_us_to_timespec(until_time);
+ struct timespec ts = mp_time_us_to_realtime(until_time);
pthread_cond_timedwait(&in->wakeup, &in->lock, &ts);
}
pthread_mutex_unlock(&in->lock);
@@ -867,7 +867,7 @@ void vo_wait_frame(struct vo *vo)
static void wait_until(struct vo *vo, int64_t target)
{
struct vo_internal *in = vo->in;
- struct timespec ts = mp_time_us_to_timespec(target);
+ struct timespec ts = mp_time_us_to_realtime(target);
pthread_mutex_lock(&in->lock);
while (target > mp_time_us()) {
if (in->queued_events & VO_EVENT_LIVE_RESIZING)