summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-01 05:37:28 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-01 05:37:28 +0200
commit30c5994382301ad72b7fbf60687ac666d7447612 (patch)
tree6913bdc2cc4b9352f08ec82632a4f940aa1cef92
parentd76ad5f227f2ae26ca2dc8896efdb55ede297a19 (diff)
downloadmpv-30c5994382301ad72b7fbf60687ac666d7447612.tar.bz2
mpv-30c5994382301ad72b7fbf60687ac666d7447612.tar.xz
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.
-rw-r--r--mplayer.c3
1 files changed, 3 insertions, 0 deletions
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) {