mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
d76ad5f227
commit
30c5994382
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue