1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-04 22:22:16 +00:00

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.
This commit is contained in:
wm4 2015-08-25 21:31:37 +02:00
parent cf94fce467
commit 6238491688

View File

@ -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;
}