# HG changeset patch # User bcoudurier # Date 1243656523 0 # Node ID cffc8ed619e9d4f391d79b4b892fccc770217815 # Parent 04c546a9a3fde48cce5a391df6ab6bd5c289a00e cast size to int64_t to avoid overflow diff -r 04c546a9a3fd -r cffc8ed619e9 utils.c --- 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;