audio: reset pull AO at end of file

When a pull AO reaches reaches EOF then ao_read_data() will set
p->playing = false.
Because the ao is marked as not playing ao_set_pause(true) will not
reset the AO.
This keeps the output stream unintentionally open.

Fixes #9835
This commit is contained in:
Thomas Weißschuh authored and Philip Langdale committed 2022-12-22 15:14:08 -08:00
1 parent 874e28f4a4
commit 657fd2804c
1 file changed
+1 -1
+1 -1
View File
@@ -357,7 +357,7 @@ void ao_set_paused(struct ao *ao, bool paused)
pthread_mutex_lock(&p->lock);
if (p->playing && !p->paused && paused) {
if ((p->playing || !ao->driver->write) && !p->paused && paused) {
if (p->streaming && !ao->stream_silence) {
if (ao->driver->write) {
if (!p->recover_pause)