From 30c5994382301ad72b7fbf60687ac666d7447612 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 1 Jan 2011 05:37:28 +0200 Subject: core: add timing workaround for PulseAudio misbehavior PulseAudio could keep reporting high delay values after a reset of playing audio. This broke playback after seeking in some cases. Add a workaround that should make things more robust against such misbehavior. --- mplayer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mplayer.c b/mplayer.c index e2b8a372d1..893ae77694 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2250,6 +2250,9 @@ static int sleep_until_near_frame(struct MPContext *mpctx, float *time_frame, double audio_limit = 2; current_module="calc_sleep_time"; + if (mpctx->restart_playback) + return 0; + *time_frame -= get_relative_time(mpctx); // reset timer if (mpctx->sh_audio && !mpctx->d_audio->eof) { -- cgit v1.2.3