vo: fix unpausing with display-sync

Currently, vo.c will always continue to render the currently queued
frame, which sets last_flip, which in turn confuses vo_get_delay(),
which in turn will show a bogus A/V desync message on unpause. So just
reset it again on unpause.
This commit is contained in:
wm4 2015-11-15 13:17:54 +01:00
parent cf3b34f17a
commit c7d82dd25c
1 changed files with 3 additions and 5 deletions

View File

@ -868,11 +868,9 @@ void vo_set_paused(struct vo *vo, bool paused)
pthread_mutex_lock(&in->lock); pthread_mutex_lock(&in->lock);
if (in->paused != paused) { if (in->paused != paused) {
in->paused = paused; in->paused = paused;
if (in->paused) { if (in->paused && in->dropped_frame)
if (in->dropped_frame) in->request_redraw = true;
in->request_redraw = true; in->last_flip = 0;
in->last_flip = 0;
}
} }
pthread_mutex_unlock(&in->lock); pthread_mutex_unlock(&in->lock);
vo_control(vo, paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL); vo_control(vo, paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);