diff options
author | Philip Langdale <philipl@overt.org> | 2022-08-23 09:59:32 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-08-23 11:01:52 -0700 |
commit | ed7717298bd32316065bc1718092d75123a891e6 (patch) | |
tree | e5495f2abb5f2973a45c5dcca10d30f1debaf2d6 /audio | |
parent | e2e8c21be4fdf826d91a141e181d9a3ddf65c6c6 (diff) | |
download | mpv-ed7717298bd32316065bc1718092d75123a891e6.tar.bz2 mpv-ed7717298bd32316065bc1718092d75123a891e6.tar.xz |
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
Diffstat (limited to 'audio')
-rw-r--r-- | audio/out/buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |