From ed7717298bd32316065bc1718092d75123a891e6 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Tue, 23 Aug 2022 09:59:32 -0700 Subject: audio: fix lack of reinitialization on format change with pull AOs uau did some investigation and noticed that we do not send a wakeup event when we encounter end-of-stream in ao_read_data(), in contrast to the equivalent logic for push AOs in ao_play_data(). Inserting that wakeup fixes the original problem of lack of reinitialization on a format change without the problems we saw with the previous attempted fix. Fixes #10566 --- audio/out/buffer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'audio') diff --git a/audio/out/buffer.c b/audio/out/buffer.c index 2a69596597..11bd14f733 100644 --- a/audio/out/buffer.c +++ b/audio/out/buffer.c @@ -193,6 +193,7 @@ int ao_read_data(struct ao *ao, void **data, int samples, int64_t out_time_us) if (pos < samples && p->playing && !p->paused) { p->playing = false; + ao->wakeup_cb(ao->wakeup_ctx); // For ao_drain(). pthread_cond_broadcast(&p->wakeup); } -- cgit v1.2.3