From a0d3ce48192507dcd0ebaccbe6b3428b43964c08 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Feb 2016 18:33:31 +0100 Subject: audio: fix EOF handling if nothing could be decoded at all The code for decoding the initial frame has to handle this explicitly. --- player/audio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/player/audio.c b/player/audio.c index a18e004788..27be10a4de 100644 --- a/player/audio.c +++ b/player/audio.c @@ -732,6 +732,10 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts) int r = decode_new_frame(mpctx->ao_chain); if (r == AD_WAIT) return; // continue later when new data is available + if (r == AD_EOF) { + mpctx->audio_status = STATUS_EOF; + return; + } reinit_audio_filters_and_output(mpctx); mpctx->sleeptime = 0; return; // try again next iteration -- cgit v1.2.3