From f3b29a680c7ded759e5304dce0c73d172eac7dae Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 11 Jul 2020 00:16:53 +0200 Subject: 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 --- audio/out/ao_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') 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 -- cgit v1.2.3