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 <anton@khirnov.net>
This commit is contained in:
parent
a94f789c33
commit
1076ea8115
@ -1571,6 +1571,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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user