summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-30 12:53:43 +0100
committerwm4 <wm4@nowhere>2015-10-30 12:53:43 +0100
commit8737732035264b0b5ca3c7db05ec0ed73a1fa155 (patch)
tree6d8da47d88ff061ab417577e94ce96fddbfc9488 /video/out/opengl/video.c
parent67aab3a9f674b392159495094dcd40f7e69ee9b4 (diff)
downloadmpv-8737732035264b0b5ca3c7db05ec0ed73a1fa155.tar.bz2
mpv-8737732035264b0b5ca3c7db05ec0ed73a1fa155.tar.xz
vo_opengl: cache frames only in display-sync mode
vo_frame.num_vsyncs can be != 1 in some cases in normal sync mode too. This is not a very exact fix, but in exchange it's robust. (These vo_frame flags are way too tricky in combination with redrawing and such.)
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 60d987a31b..00c7663e91 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1926,7 +1926,9 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo)
gl_video_upload_image(p, frame->current);
pass_render_frame(p);
- if (frame->num_vsyncs == 1 || p->opts.dumb_mode) {
+ if (frame->num_vsyncs == 1 || !frame->display_synced ||
+ p->opts.dumb_mode)
+ {
// Disable output_fbo_valid to signal that this frame
// does not require any redraws from the FBO.
pass_draw_to_screen(p, fbo);