summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-26 20:19:39 +0200
committerwm4 <wm4@nowhere>2016-08-26 20:19:39 +0200
commit872b7a26549568dc72cae7fae024c4c3a103c845 (patch)
tree767a0254bbf8484aca074359abcbf6912181982b /video
parentbc97d60542b353141bedeee985f9e5bd68b9f076 (diff)
downloadmpv-872b7a26549568dc72cae7fae024c4c3a103c845.tar.bz2
mpv-872b7a26549568dc72cae7fae024c4c3a103c845.tar.xz
vo: remove redundant wakeup
Shouldn't matter. Was pointed out by someone. The change should help avoiding extra unneeded wakeups on the VO thread.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 139b840c23..0d70106ed8 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -665,7 +665,9 @@ bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts)
r = false;
if (!in->wakeup_pts || next_pts < in->wakeup_pts) {
in->wakeup_pts = next_pts;
- wakeup_locked(vo);
+ // If we have to wait, update the vo thread's timer.
+ if (!r)
+ wakeup_locked(vo);
}
}
pthread_mutex_unlock(&in->lock);