Module: libav Branch: release/0.8 Commit: 1076ea8115ada59d9c779d67209f0548cc03b604
Author: Luca Barbato <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Mon Oct 22 18:50:32 2012 +0200 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. (cherry picked from commit 0c03cc68386443f1e96ab6fb358220faf67cd5ff) Signed-off-by: Anton Khirnov <[email protected]> --- libavcodec/mpegaudiodec.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index cd0d26d..adb25ff 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,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); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
