diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-09 22:50:05 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-11 22:28:50 +0000 |
commit | 41c03212083485afd683c4b6231d49b9557bb0a4 (patch) | |
tree | 57e9d607f60e8da20631187ee07b7c7fa2beca8f /audio/out/ao.h | |
parent | 908dc791299672042b0fc24de64b57f88bba313c (diff) | |
download | mpv-41c03212083485afd683c4b6231d49b9557bb0a4.tar.bz2 mpv-41c03212083485afd683c4b6231d49b9557bb0a4.tar.xz |
audio: drain ao before setting pause
There's an edge cause with gapless audio and pausing. Since, gapless
audio works by sending an EOF immediately, it's possible to pause on the
next file before audio actually finishes playing and thus the sound gets
cut off. The fix is to simply just always do an ao_drain if the ao is
about to set a pause on EOF and we still have audio playing.
Fixes #8898.
Diffstat (limited to 'audio/out/ao.h')
-rw-r--r-- | audio/out/ao.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao.h b/audio/out/ao.h index 78f21c9ed9..18c7cdc02f 100644 --- a/audio/out/ao.h +++ b/audio/out/ao.h @@ -98,7 +98,7 @@ void ao_set_gain(struct ao *ao, float gain); double ao_get_delay(struct ao *ao); void ao_reset(struct ao *ao); void ao_start(struct ao *ao); -void ao_set_paused(struct ao *ao, bool paused); +void ao_set_paused(struct ao *ao, bool paused, bool eof); void ao_drain(struct ao *ao); bool ao_is_playing(struct ao *ao); struct mp_async_queue; |