summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-06 18:33:31 +0100
committerwm4 <wm4@nowhere>2016-02-06 18:33:31 +0100
commita0d3ce48192507dcd0ebaccbe6b3428b43964c08 (patch)
tree3143b043ec6a9b517e587a99fc3f5f40297670d4
parentfb5f73279817023249476a02ca5afc36c6e52fda (diff)
downloadmpv-a0d3ce48192507dcd0ebaccbe6b3428b43964c08.tar.bz2
mpv-a0d3ce48192507dcd0ebaccbe6b3428b43964c08.tar.xz
audio: fix EOF handling if nothing could be decoded at all
The code for decoding the initial frame has to handle this explicitly.
-rw-r--r--player/audio.c4
1 files changed, 4 insertions, 0 deletions
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