diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-01 05:37:28 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-01 05:37:28 +0200 |
commit | 30c5994382301ad72b7fbf60687ac666d7447612 (patch) | |
tree | 6913bdc2cc4b9352f08ec82632a4f940aa1cef92 /mplayer.c | |
parent | d76ad5f227f2ae26ca2dc8896efdb55ede297a19 (diff) | |
download | mpv-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.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |