1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 18:05:21 +00:00

audio: alternative fix for previous commit

This is a somewhat obscure situation, and happens only if audio starts
again after it has ended (in particular can happens with files where
audio starts later). It doesn't matter much whether audio starts
immediately or some milliseconds later, so simplify it.
This commit is contained in:
wm4 2014-11-27 18:52:22 +01:00 committed by Alessandro Ghedini
parent 4f74869cd8
commit bc1370041d

View File

@ -514,10 +514,7 @@ static void do_fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
// restart audio properly. This helps with video files where audio starts
// later. Retrying is needed to get the correct sync PTS.
if (mpctx->audio_status >= STATUS_DRAINING && status == AD_OK) {
if (!mpctx->paused) {
mpctx->audio_status = STATUS_SYNCING;
mpctx->sleeptime = 0;
}
mpctx->audio_status = STATUS_SYNCING;
return; // retry on next iteration
}