diff options
author | wm4 <wm4@nowhere> | 2015-01-14 07:58:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-14 07:58:01 +0100 |
commit | 3cb2add636b776d7707ea0d0d5d6c6593c577207 (patch) | |
tree | 66797fbccef66232ecccbcb6246010d9550db66a /audio | |
parent | ecca64e1821a7bdb80ecf02827ff169df47d2023 (diff) | |
download | mpv-3cb2add636b776d7707ea0d0d5d6c6593c577207.tar.bz2 mpv-3cb2add636b776d7707ea0d0d5d6c6593c577207.tar.xz |
audio: fix assertion failure on audio decoding
There are several cases in which a decoder may need several packets to
produce some output audio. Commit 5e25a3d2 broke this.
Fixes #1471.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/decode/dec_audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index 3c196709c8..30facb4c11 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -217,8 +217,8 @@ int audio_decode(struct dec_audio *da, struct mp_audio_buffer *outbuf, copy_output(afs, outbuf, minsamples, true); break; } - - assert(mpa); + if (!mpa) + continue; da->pts_offset += mpa->samples; da->decode_format = *mpa; |