summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-03 21:53:32 +0200
committerwm4 <wm4@nowhere>2014-10-03 23:07:08 +0200
commita74a324b98a2484995cdf9206f0e586a7249f1af (patch)
tree04e1363cd00f0722807fe62c1f77a9e1441efe12 /player
parent9d5d031b6d23402a465618892a40b7af6d4e3c28 (diff)
downloadmpv-a74a324b98a2484995cdf9206f0e586a7249f1af.tar.bz2
mpv-a74a324b98a2484995cdf9206f0e586a7249f1af.tar.xz
video: return responsibility of video redraw back to playloop
When the VO was moved it its own thread, responsibility for redrawing was given to the VO thread itself. So if there was a condition that indicated that redrawing was required, like expose events or certain VOCTRLs, the VO thread was redrawing itself. This worked fine, but there are some corner cases where this works rather badly. E.g. if I fullscreen the player and hit panscan controls with mpv's default autorepeat rate, playback stops. This happens because the VO redraws itself after every panscan change command. Running each (repeated) command takes so long due to redrawing and (involuntary) waiting on vsync, that it never leaves the input processing loop while the key is held down. I suspect that in my case, redrawing in fullscreen mode just gets slow enough that it takes 2 vsyncs instead of 1 on average, and the processing time gets larger than the autorepeat delay. Fix this by taking redraw control from the VO, and instead let the playloop issue a "real" redraw command to the VO if needed. This basically reverts redraw handling to what it was before moving the VO to a thread. CC: @mpv-player/stable
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 5cefcb8ac5..c5077b43dd 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -533,7 +533,8 @@ static void handle_osd_redraw(struct MPContext *mpctx)
// Don't redraw immediately during a seek (makes it significantly slower).
if (mpctx->d_video && mp_time_sec() - mpctx->start_timestamp < 0.1)
return;
- bool want_redraw = osd_query_and_reset_want_redraw(mpctx->osd);
+ bool want_redraw = osd_query_and_reset_want_redraw(mpctx->osd) ||
+ vo_want_redraw(mpctx->video_out);
if (!want_redraw)
return;
vo_redraw(mpctx->video_out);