From 7696a392e2d28efd1af6271f86b67b6ec4fa6408 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 21 Oct 2012 01:31:53 +0200 Subject: [PATCH] mp3dec: propagate error code correctly. Signed-off-by: Michael Niedermayer --- libavcodec/mpegaudiodec.c | 3 +++ 1 file changed, 3 insertions(+) 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;