diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-10-22 18:50:32 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-10-23 14:22:16 +0200 |
commit | 0c03cc68386443f1e96ab6fb358220faf67cd5ff (patch) | |
tree | 5492da2a64ab60130433fcc76855a2a00dbcb4e3 /libavcodec | |
parent | c2dac8ac7a1f040a17be07beabfbfcf66035b433 (diff) | |
download | ffmpeg-0c03cc68386443f1e96ab6fb358220faf67cd5ff.tar.gz |
mp3: exit on parsing error in mp_decode_frame
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.
Based on a patch by Michael Niedermayer.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index d08177e9eb..169254f5d7 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1572,6 +1572,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); + if (nb_frames < 0) + return nb_frames; + s->last_buf_size=0; if (s->in_gb.buffer) { align_get_bits(&s->gb); |