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:
wm4 2014-10-10 13:21:43 +02:00
parent bd41fc7723
commit 7e4491a7a7
1 changed files with 1 additions and 1 deletions

View File

@ -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) {