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:
parent
10a1b98082
commit
6e6ec33168
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user