mirror of https://github.com/mpv-player/mpv
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:
parent
874e28f4a4
commit
657fd2804c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue