Mercurial > libavformat.hg
diff utils.c @ 4971:cffc8ed619e9 libavformat
cast size to int64_t to avoid overflow
author | bcoudurier |
---|---|
date | Sat, 30 May 2009 04:08:43 +0000 |
parents | f35f6f0b7fe7 |
children | 76263311c368 |
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;