[FFmpeg-cvslog] r12981 - trunk/libavcodec/mpegaudiodec.c

bcoudurier subversion
Sat Apr 26 14:39:45 CEST 2008


Author: bcoudurier
Date: Sat Apr 26 14:39:45 2008
New Revision: 12981

Log:
return error if buf_size is too small

Modified:
   trunk/libavcodec/mpegaudiodec.c

Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	(original)
+++ trunk/libavcodec/mpegaudiodec.c	Sat Apr 26 14:39:45 2008
@@ -2570,11 +2570,10 @@ static int decode_frame_mp3on4(AVCodecCo
 
     len = buf_size;
 
+    *data_size = 0;
     // Discard too short frames
-    if (buf_size < HEADER_SIZE) {
-        *data_size = 0;
-        return buf_size;
-    }
+    if (buf_size < HEADER_SIZE)
+        return -1;
 
     // If only one decoder interleave is not needed
     outptr = s->frames == 1 ? out_samples : decoded_buf;




More information about the ffmpeg-cvslog mailing list