summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-06-02 19:30:15 +0200
committerwm4 <wm4@nowhere>2020-06-02 20:43:49 +0200
commit0d3474c6c0d3bea20bfd50614ffaa3b21d4538cf (patch)
tree5d89ba03fcb591478a1efd0b826b34309be5c75b /audio/out
parent0edeb0899a154a57a24e02d487e47bae648e8eff (diff)
downloadmpv-0d3474c6c0d3bea20bfd50614ffaa3b21d4538cf.tar.bz2
mpv-0d3474c6c0d3bea20bfd50614ffaa3b21d4538cf.tar.xz
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.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/buffer.c2
1 files changed, 1 insertions, 1 deletions
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);