]> git.sesse.net Git - ffmpeg/commitdiff
check for error
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 5 May 2005 20:05:41 +0000 (20:05 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 5 May 2005 20:05:41 +0000 (20:05 +0000)
Originally committed as revision 4183 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpegaudiodec.c

index 196d77d2a6aeee68a2063192892a1b351ba52ee2..106c9fe6893e9af533667b724cc4160bb61c471a 100644 (file)
@@ -2628,7 +2628,10 @@ static int decode_frame(AVCodecContext * avctx,
             }
            s->inbuf_ptr = s->inbuf;
            s->frame_size = 0;
-           *data_size = out_size;
+            if(out_size>=0)
+               *data_size = out_size;
+            else
+                av_log(avctx, AV_LOG_DEBUG, "Error while decoding mpeg audio frame\n"); //FIXME return -1 / but also return the number of bytes consumed
            break;
        }
     }