1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

cast size to int64_t to avoid overflow

Originally committed as revision 18991 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-05-30 04:08:43 +00:00
parent 3bbcd0bb8a
commit db5dc02bd7

View File

@ -600,7 +600,7 @@ static int get_audio_frame_size(AVCodecContext *enc, int size)
/* 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;