Browse Source

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.
tags/n1.1
Luca Barbato 12 years ago
parent
commit
0c03cc6838
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/mpegaudiodec.c

+ 3
- 0
libavcodec/mpegaudiodec.c 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);


Loading…
Cancel
Save