From 031fb6fa951fa180bd09f57b4eeda36574ba8264 Mon Sep 17 00:00:00 2001 From: Alexander Mitzscherling <43502191+mitzsch@users.noreply.github.com> Date: Sat, 11 Mar 2023 18:02:53 +0100 Subject: [PATCH] Revert "vo: fix race condition with redraw requests" Revert commit 296d40dc6f38401085d005bb4627f8afff46b041. This is needed due to a regression introduced that leads to many dropped frames when having the stats overlay enabled. It only happens when the file's fps match the display fps. --- video/out/vo.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/video/out/vo.c b/video/out/vo.c index 40079049f851a..031a4e61a2979 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -944,9 +944,6 @@ static bool render_frame(struct vo *vo) in->prev_vsync = now; in->expecting_vsync = use_vsync; - // Store the initial value before we unlock. - bool request_redraw = in->request_redraw; - if (in->dropped_frame) { in->drop_count += 1; wakeup_core(vo); @@ -1007,14 +1004,7 @@ static bool render_frame(struct vo *vo) if (in->dropped_frame) { MP_STATS(vo, "drop-vo"); } else { - // If the initial redraw request was true, then we can - // clear it here since we just performed a redraw and are - // merely clearing that request. However if there initially is - // no redraw request, then something can change this (i.e. the OSD) - // while the vo was unlocked. Don't touch in->request_redraw - // in that case. - if (request_redraw) - in->request_redraw = false; + in->request_redraw = false; } if (in->current_frame && in->current_frame->num_vsyncs &&