mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 07:12:39 +00:00
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.
This commit is contained in:
parent
6789f9b094
commit
e6291697e3
@ -196,8 +196,10 @@ struct vo_frame {
|
||||
// Set if the current frame is repeated from the previous. It's guaranteed
|
||||
// that the current is the same as the previous one, even if the image
|
||||
// pointer is different.
|
||||
// The repeat flag is additionally set if the OSD does not need to be
|
||||
// redrawn.
|
||||
// The repeat flag is set if exactly the same frame should be rendered
|
||||
// again (and the OSD does not need to be redrawn).
|
||||
// A repeat frame can be redrawn, in which case repeat==redraw==true, and
|
||||
// OSD should be updated.
|
||||
bool redraw, repeat;
|
||||
// The frame is not in movement - e.g. redrawing while paused.
|
||||
bool still;
|
||||
|
@ -296,6 +296,7 @@ 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;
|
||||
if (frame->redraw || !frame->current)
|
||||
wait_present_count += 1;
|
||||
pthread_cond_signal(&ctx->wakeup);
|
||||
talloc_free(ctx->cur_frame);
|
||||
|
Loading…
Reference in New Issue
Block a user