changeset 4971:cffc8ed619e9 libavformat

cast size to int64_t to avoid overflow
author bcoudurier
date Sat, 30 May 2009 04:08:43 +0000
parents 04c546a9a3fd
children 595e9bd313fd
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Fri May 29 13:46:46 2009 +0000
+++ b/utils.c	Sat May 30 04:08:43 2009 +0000
@@ -600,7 +600,7 @@
             /* 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;