diff options
author | wm4 <wm4@nowhere> | 2016-10-30 12:00:33 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-30 12:00:33 +0100 |
commit | 1afc0c8b559d70a3764c8c791286553ad6677bc0 (patch) | |
tree | 6fc2188770e066d0daba79a520d60c0771fd6f7a /video/out | |
parent | a1801da717460e7791402674658d31db65e1089d (diff) | |
download | mpv-1afc0c8b559d70a3764c8c791286553ad6677bc0.tar.bz2 mpv-1afc0c8b559d70a3764c8c791286553ad6677bc0.tar.xz |
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.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo_opengl_cb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c index 20e9523cb0..8d2af31491 100644 --- a/video/out/vo_opengl_cb.c +++ b/video/out/vo_opengl_cb.c @@ -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); |