From d45b68b938df9eb10f5f600a4959a936c13e358e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 May 2014 20:54:50 +0200 Subject: player: fix cover art sometimes "syncing" against audio Cover art is treated like video, but is not really video. In one case, the audio sync code was accidentally still active. Fixes cover art playback with --ao=null. (This is due to ao_null's latency emulation. Although it's not very clear whether that is actually correct...) --- player/playloop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 835d9b0bec..3488abe9d1 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1054,7 +1054,9 @@ void run_playloop(struct MPContext *mpctx) mpctx->time_frame -= get_relative_time(mpctx); double audio_pts = playing_audio_pts(mpctx); - if (full_audio_buffers && !mpctx->restart_playback) { + if (!mpctx->sync_audio_to_video) { + mpctx->time_frame = 0; + } else if (full_audio_buffers && !mpctx->restart_playback) { double buffered_audio = ao_get_delay(mpctx->ao); MP_TRACE(mpctx, "audio delay=%f\n", buffered_audio); -- cgit v1.2.3