mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
e2e8c21be4
commit
ed7717298b
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue