diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-05 13:13:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-05 13:20:03 +0100 |
commit | 2de8bfd2ef06a5cd8293d3054c5f409d828d539c (patch) | |
tree | 8ce38c7afaaf5a02d34a365d17cc9c284a50ee70 /libavcodec/pcm.c | |
parent | 0c56f8303e676556ea09bfac73d881c6c9057259 (diff) | |
download | ffmpeg-2de8bfd2ef06a5cd8293d3054c5f409d828d539c.tar.gz |
avcodec/pcm: Fix overflow in bitrate computation
Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r-- | libavcodec/pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 2cb5a360d6..9a13602543 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -47,7 +47,7 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx) avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id); avctx->block_align = avctx->channels * avctx->bits_per_coded_sample / 8; - avctx->bit_rate = avctx->block_align * avctx->sample_rate * 8; + avctx->bit_rate = avctx->block_align * 8LL * avctx->sample_rate; return 0; } |