diff --git a/video/out/vo.c b/video/out/vo.c index 031a4e61a2..40079049f8 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -944,6 +944,9 @@ 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); @@ -1004,7 +1007,14 @@ static bool render_frame(struct vo *vo) if (in->dropped_frame) { MP_STATS(vo, "drop-vo"); } else { - in->request_redraw = false; + // 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; } if (in->current_frame && in->current_frame->num_vsyncs &&