summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-09 22:11:34 +0200
committerwm4 <wm4@nowhere>2020-05-09 22:23:18 +0200
commit2446f5f43b308b1af4a094fc1502142d9b14ea51 (patch)
tree567a62c99d17eec48e8a324fc10a41a8883458a2
parentc1a961ad78b6d1da339e622c723d753a80687824 (diff)
downloadmpv-2446f5f43b308b1af4a094fc1502142d9b14ea51.tar.bz2
mpv-2446f5f43b308b1af4a094fc1502142d9b14ea51.tar.xz
vo: always reset redraw flag to avoid immediate wakeups wasting CPU time
This could temporarily hog the core or something because it's a stupid fragile state machine that should best be wiped out. Fixes: #7699
-rw-r--r--video/out/vo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 2b15543a99..1063309fe7 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -1081,6 +1081,7 @@ static void *vo_thread(void *ptr)
mp_dispatch_queue_process(vo->in->dispatch, 0);
if (in->terminate)
break;
+ stats_event(in->stats, "iterations");
vo->driver->control(vo, VOCTRL_CHECK_EVENTS, NULL);
bool working = render_frame(vo);
int64_t now = mp_time_us();
@@ -1096,10 +1097,10 @@ static void *vo_thread(void *ptr)
}
}
if (vo->want_redraw && !in->want_redraw) {
- vo->want_redraw = false;
in->want_redraw = true;
wakeup_core(vo);
}
+ vo->want_redraw = false;
bool redraw = in->request_redraw;
bool send_reset = in->send_reset;
in->send_reset = false;