Skip to content
Snippets Groups Projects
Commit 0c03cc68 authored by Luca Barbato's avatar Luca Barbato
Browse files

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.
parent c2dac8ac
No related branches found
No related tags found
No related merge requests found
...@@ -1572,6 +1572,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, ...@@ -1572,6 +1572,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples,
default: default:
nb_frames = mp_decode_layer3(s); nb_frames = mp_decode_layer3(s);
if (nb_frames < 0)
return nb_frames;
s->last_buf_size=0; s->last_buf_size=0;
if (s->in_gb.buffer) { if (s->in_gb.buffer) {
align_get_bits(&s->gb); align_get_bits(&s->gb);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment