1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

audio: block ao buffer for keep-open

This prevents the pause state from triggering before the audio output is
finished playing back audio. This is particularly helpful for gapless
audio.
This commit is contained in:
dudemanguy 2019-08-30 13:11:39 -05:00 committed by sfan5
parent 10a1b98082
commit 6e6ec33168

View File

@ -846,8 +846,11 @@ static void handle_keep_open(struct MPContext *mpctx)
seek_to_last_frame(mpctx);
mpctx->playback_pts = mpctx->last_vo_pts;
}
if (opts->keep_open_pause)
if (opts->keep_open_pause) {
if (mpctx->ao)
ao_drain(mpctx->ao);
set_pause_state(mpctx, true);
}
}
}