From 668ba7441aed3157474e03cbb1ff24430919fa85 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 9 Feb 2016 21:38:28 +0100 Subject: vo_opengl_cb: do also not block when drawing nothing The ctx->redrawing field signals whether flip_page() should block. Do not block if a black frame (i.e. nothing) is to be rendered. Also, frame==NULL can never happen. --- video/out/vo_opengl_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c index 5b8bf72b99..6c425e390d 100644 --- a/video/out/vo_opengl_cb.c +++ b/video/out/vo_opengl_cb.c @@ -355,7 +355,7 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) assert(!p->ctx->next_frame); p->ctx->next_frame = vo_frame_ref(frame); p->ctx->expected_flip_count = p->ctx->flip_count + 1; - p->ctx->redrawing = frame ? frame->redraw : false; + p->ctx->redrawing = frame->redraw || !frame->current; update(p); pthread_mutex_unlock(&p->ctx->lock); } -- cgit v1.2.3