diff options
author | wm4 <wm4@nowhere> | 2016-02-06 18:33:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-06 18:33:31 +0100 |
commit | a0d3ce48192507dcd0ebaccbe6b3428b43964c08 (patch) | |
tree | 3143b043ec6a9b517e587a99fc3f5f40297670d4 /player | |
parent | fb5f73279817023249476a02ca5afc36c6e52fda (diff) | |
download | mpv-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.
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 4 |
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 |