[FFmpeg-cvslog] mp3dec: propagate error code correctly.
Michael Niedermayer
git at videolan.org
Sun Oct 21 03:25:27 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 21 01:31:53 2012 +0200| [7696a392e2d28efd1af6271f86b67b6ec4fa6408] | committer: Michael Niedermayer
mp3dec: propagate error code correctly.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7696a392e2d28efd1af6271f86b67b6ec4fa6408
---
libavcodec/mpegaudiodec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 6ef1f6b..77f86c5 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;
More information about the ffmpeg-cvslog
mailing list