summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-21 14:31:51 +0100
committerwm4 <wm4@nowhere>2017-02-21 15:39:44 +0100
commiteae12bf9637df1d2b9077a9d3666cd55e7b09459 (patch)
tree7b90965a73150cf6b2eb374891930d02812846b6 /video/out/vo_opengl.c
parent3cd29ca0318cfab04d155ea8323e7b4c84010b79 (diff)
downloadmpv-eae12bf9637df1d2b9077a9d3666cd55e7b09459.tar.bz2
mpv-eae12bf9637df1d2b9077a9d3666cd55e7b09459.tar.xz
vo: fix subtleties in the redrawing logic
This fixes a race condition created by the previous commit, and possibly others. Sometimes interpolated frames weren't redrawn as uninterpolated ones. The problem is that redrawing/drawing a frame can't reset the VO want_redraw flags, because logically these have to happen after the core acknowledged and explicitly reissued a redraw. The core needs to be involved because the OSD text and drawings could depend on the playback or window state. Change it such that it always goes through the core. Also, VOs inconsistently called vo_wakeup() when setting want_redraw, which is also taken care of by this commit.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 4917a251c6..419631a0df 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -295,10 +295,8 @@ static int control(struct vo *vo, uint32_t request, void *data)
gl_video_reset(p->renderer);
return true;
case VOCTRL_PAUSE:
- if (gl_video_showing_interpolated_frame(p->renderer)) {
+ if (gl_video_showing_interpolated_frame(p->renderer))
vo->want_redraw = true;
- vo_wakeup(vo);
- }
return true;
case VOCTRL_PERFORMANCE_DATA:
*(struct voctrl_performance_data *)data = gl_video_perfdata(p->renderer);