mpegaudidec: 10l forgot buf_size
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 20:22:45 +0000 (22:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 20:22:45 +0000 (22:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegaudiodec.c

index 8635d47..64cbba8 100644 (file)
@@ -1637,8 +1637,10 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
     uint32_t header;
     int out_size;
 
-    while(buf_size && !*buf)
+    while(buf_size && !*buf){
         buf++;
+        buf_size--;
+    }
 
     if (buf_size < HEADER_SIZE)
         return AVERROR_INVALIDDATA;