OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2dac8a
)
mp3: exit on parsing error in mp_decode_frame
author
Luca Barbato
<lu_zero@gentoo.org>
Mon, 22 Oct 2012 16:50:32 +0000
(18:50 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 23 Oct 2012 12:22:16 +0000
(14:22 +0200)
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.
Based on a patch by Michael Niedermayer.
libavcodec/mpegaudiodec.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpegaudiodec.c
b/libavcodec/mpegaudiodec.c
index
d08177e
..
169254f
100644
(file)
--- a/
libavcodec/mpegaudiodec.c
+++ b/
libavcodec/mpegaudiodec.c
@@
-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);