1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
This commit is contained in:
Luca Barbato 2012-10-22 18:50:32 +02:00
parent c2dac8ac7a
commit 0c03cc6838

View File

@ -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);