summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-21 01:31:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-21 02:52:10 +0200
commit7696a392e2d28efd1af6271f86b67b6ec4fa6408 (patch)
tree2842c55f29dd03545b4a3993fa154c865b5238fa /libavcodec/mpegaudiodec.c
parent273fca9ac071da4078afa61f087e1e90fafd4958 (diff)
mp3dec: propagate error code correctly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 6ef1f6b427..77f86c5549 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1616,6 +1616,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples,
s->last_buf_size += i;
}
+ if(nb_frames < 0)
+ return nb_frames;
+
/* get output buffer */
if (!samples) {
s->frame.nb_samples = s->avctx->frame_size;