1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

audio: slightly better condition for still_playing

Just a detail. If wrong (not unlikely because I'm just guessing my own
messy state machine), this will make the player freeze due to waiting
for something that never happens. Enjoy.
This commit is contained in:
wm4 2020-06-02 19:30:15 +02:00
parent 0edeb0899a
commit 0d3474c6c0

View File

@ -641,6 +641,7 @@ static void ao_play_data(struct ao *ao)
ao->driver->start(ao);
p->streaming = true;
}
p->still_playing = !play_silence;
}
if (p->draining && p->still_playing && ao->untimed) {
@ -651,7 +652,6 @@ static void ao_play_data(struct ao *ao)
// Wait until space becomes available. Also wait if we actually wrote data,
// so the AO wakes us up properly if it needs more data.
p->ao_wait_low_buffer = space == 0 || written > 0 || p->draining;
p->still_playing |= samples > 0 && !play_silence;
// Request more data if we're below some random buffer level.
int needed = unlocked_get_space(ao);