1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

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.
This commit is contained in:
wm4 2016-02-09 21:38:28 +01:00
parent 3d09bd77dd
commit 668ba7441a

View File

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