[FFmpeg-cvslog] mp3: exit on parsing error in mp_decode_frame
Luca Barbato
git at videolan.org
Wed Oct 24 13:46:55 CEST 2012
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Oct 22 18:50:32 2012 +0200| [0c03cc68386443f1e96ab6fb358220faf67cd5ff] | committer: Luca Barbato
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c03cc68386443f1e96ab6fb358220faf67cd5ff
---
libavcodec/mpegaudiodec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index d08177e..169254f 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);
More information about the ffmpeg-cvslog
mailing list