summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-07-11 00:16:53 +0200
committersfan5 <sfan5@live.de>2020-07-12 23:34:08 +0200
commitf3b29a680c7ded759e5304dce0c73d172eac7dae (patch)
tree5d4e071ddcec234aae3e3efe485b77aba4f11fc2 /audio
parentc82abb3a65ded48c39d46d4e2f966c5883ebe6c2 (diff)
downloadmpv-f3b29a680c7ded759e5304dce0c73d172eac7dae.tar.bz2
mpv-f3b29a680c7ded759e5304dce0c73d172eac7dae.tar.xz
ao/pulse: flush stream on underrun
The underflow callback introduced in d27ad96 can be called when the buffer is still full, causing playback to never resume afterwards since get_state() reports free_samples == 0. Fix this by fully resetting on underrun, which flushes the stream and ensures free buffer space. fixes #7874
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_pulse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
index 7ffbeb43ef..31c84e06ff 100644
--- a/audio/out/ao_pulse.c
+++ b/audio/out/ao_pulse.c
@@ -635,7 +635,7 @@ static void audio_get_state(struct ao *ao, struct mp_pcm_state *state)
// Otherwise, PA will keep hammering us for underruns (which it does instead
// of stopping the stream automatically).
if (!state->playing)
- cork(ao, true);
+ reset(ao);
}
/* A callback function that is called when the