summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl_cb.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-10-05 12:34:47 +0200
committerwm4 <wm4@nowhere>2016-10-05 12:34:47 +0200
commite6291697e3b7d540dcee3cd49100d69d656f696a (patch)
tree6896242d45822ae887c4424b1a7199db8fe90e4f /video/out/vo_opengl_cb.c
parent6789f9b09411f83034883357303b4acfda9569ed (diff)
downloadmpv-e6291697e3b7d540dcee3cd49100d69d656f696a.tar.bz2
mpv-e6291697e3b7d540dcee3cd49100d69d656f696a.tar.xz
vo_opengl_cb: don't wait for redrawn frames
This also removes some extra waiting if no video is active, at least in theory. Also clarify the vo_frame flag comments for redraw/repeat.
Diffstat (limited to 'video/out/vo_opengl_cb.c')
-rw-r--r--video/out/vo_opengl_cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c
index c94d8b7ce8..20e9523cb0 100644
--- a/video/out/vo_opengl_cb.c
+++ b/video/out/vo_opengl_cb.c
@@ -296,7 +296,8 @@ int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int vp_w, int vp_h)
int64_t wait_present_count = ctx->present_count;
if (frame) {
ctx->next_frame = NULL;
- wait_present_count += 1;
+ if (frame->redraw || !frame->current)
+ wait_present_count += 1;
pthread_cond_signal(&ctx->wakeup);
talloc_free(ctx->cur_frame);
ctx->cur_frame = vo_frame_ref(frame);