mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
c82abb3a65
commit
f3b29a680c
|
@ -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
|
// Otherwise, PA will keep hammering us for underruns (which it does instead
|
||||||
// of stopping the stream automatically).
|
// of stopping the stream automatically).
|
||||||
if (!state->playing)
|
if (!state->playing)
|
||||||
cork(ao, true);
|
reset(ao);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A callback function that is called when the
|
/* A callback function that is called when the
|
||||||
|
|
Loading…
Reference in New Issue