changeset 2647:ac78b35aa838 libavcodec

check for error
author michael
date Thu, 05 May 2005 20:05:41 +0000
parents c735e3e60ca7
children c3a06b0b00e2
files mpegaudiodec.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Thu May 05 14:34:47 2005 +0000
+++ b/mpegaudiodec.c	Thu May 05 20:05:41 2005 +0000
@@ -2628,7 +2628,10 @@
             }
 	    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;
 	}
     }