From 6238491688791a23b333c8450fa910fd5a71ac56 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Aug 2015 21:31:37 +0200 Subject: vo_opengl: force redraw when framestepping with interpolation This might fix some problems when framestepping with interpolation enabled. The problem here is that we want to show the non-interpolated frame while paused. Framestepping is like unpausing the video for a frame, and then pausing again. This draws an interpolated frame, and redrawing on pausing is supposed to take care of this. This possibly didn't always work, because vo->want_redraw is not checked by the vo_control() code path. So wake up the VO thread (which takes care of servicing redraw requests, kind of) explicitly. The correct solution is getting rid of the public-writable want_redraw field and replacing it with a new vo_request_redraw() function, but this can come later. --- video/out/vo_opengl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 6c42531629..3985ac48a4 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -342,8 +342,10 @@ 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; } -- cgit v1.2.3