mirror of https://github.com/mpv-player/mpv
vo_opengl_cb: update current frame if a frame is dropped
Even if a frame is dropped due to the libmpv API user not drawing a frame, it should be set as current frame. This avoids dropping a frame forever in certain circumstances such as cover art of the API user was stuck at initialization or such.
This commit is contained in:
parent
a1801da717
commit
1afc0c8b55
|
@ -399,7 +399,8 @@ done:
|
|||
|
||||
// Cleanup after the API user is not reacting, or is being unusually slow.
|
||||
if (p->ctx->next_frame) {
|
||||
talloc_free(p->ctx->next_frame);
|
||||
talloc_free(p->ctx->cur_frame);
|
||||
p->ctx->cur_frame = p->ctx->next_frame;
|
||||
p->ctx->next_frame = NULL;
|
||||
p->ctx->present_count += 2;
|
||||
pthread_cond_signal(&p->ctx->wakeup);
|
||||
|
|
Loading…
Reference in New Issue