mirror of https://github.com/mpv-player/mpv
audio/out/push: make draining slightly more robust
Don't wait after the audio thread has pushed the remaining audio to the AO. Avoids hard hangs if the heuristic fails completely (could still happen if get_delay returns absurd values). CC: @mpv-player/stable
This commit is contained in:
parent
bd41fc7723
commit
7e4491a7a7
|
@ -151,7 +151,7 @@ static void drain(struct ao *ao)
|
|||
|
||||
p->final_chunk = true;
|
||||
wakeup_playthread(ao);
|
||||
while (p->still_playing)
|
||||
while (p->still_playing && mp_audio_buffer_samples(p->buffer) > 0)
|
||||
pthread_cond_wait(&p->wakeup, &p->lock);
|
||||
|
||||
if (ao->driver->drain) {
|
||||
|
|
Loading…
Reference in New Issue