diff options
author | dudemanguy <random342@airmail.cc> | 2019-08-30 13:11:39 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-09-09 00:01:16 +0200 |
commit | 6e6ec331685c78584a818f524286670911e8b4af (patch) | |
tree | 34a745dd68afc8f1569ec4d220c3b65f47f4901e | |
parent | 10a1b9808253dc67e19db2a0c4c360788b9e668e (diff) | |
download | mpv-6e6ec331685c78584a818f524286670911e8b4af.tar.bz2 mpv-6e6ec331685c78584a818f524286670911e8b4af.tar.xz |
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.
-rw-r--r-- | player/playloop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c index 9fdd04e9a8..85cc9f7faf 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -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); + } } } |