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 2022-11-26 05:20:58 +01:00 committed by Philip Langdale
parent 874e28f4a4
commit 657fd2804c
1 changed files with 1 additions and 1 deletions

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)