From 2446f5f43b308b1af4a094fc1502142d9b14ea51 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 May 2020 22:11:34 +0200 Subject: 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 --- video/out/vo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3