From 0d3474c6c0d3bea20bfd50614ffaa3b21d4538cf Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Jun 2020 19:30:15 +0200 Subject: 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. --- audio/out/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/out/buffer.c b/audio/out/buffer.c index f8cf966ae6..0a13089de9 100644 --- a/audio/out/buffer.c +++ b/audio/out/buffer.c @@ -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); -- cgit v1.2.3