[FFmpeg-cvslog] r18991 - trunk/libavformat/utils.c

bcoudurier subversion
Sat May 30 06:08:43 CEST 2009


Author: bcoudurier
Date: Sat May 30 06:08:43 2009
New Revision: 18991

Log:
cast size to int64_t to avoid overflow

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Sat May 30 06:07:14 2009	(r18990)
+++ trunk/libavformat/utils.c	Sat May 30 06:08:43 2009	(r18991)
@@ -600,7 +600,7 @@ static int get_audio_frame_size(AVCodecC
             /* used for example by ADPCM codecs */
             if (enc->bit_rate == 0)
                 return -1;
-            frame_size = (size * 8 * enc->sample_rate) / enc->bit_rate;
+            frame_size = ((int64_t)size * 8 * enc->sample_rate) / enc->bit_rate;
         }
     } else {
         frame_size = enc->frame_size;



More information about the ffmpeg-cvslog mailing list