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

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:
wm4 2016-10-30 12:00:33 +01:00
parent a1801da717
commit 1afc0c8b55

View File

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