OSDN Git Service

mp3dec: propagate error code correctly.
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 20 Oct 2012 23:31:53 +0000 (01:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Oct 2012 00:52:10 +0000 (02:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegaudiodec.c

index 6ef1f6b..77f86c5 100644 (file)
@@ -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;