From ad5807f8aa883bee5431186dc1f24c5435d722d3 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 13 Dec 2016 00:38:25 +0100 Subject: avformat: fix overflows during bit rate calculation The bit_rate field has type int64_t since commit 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Cadhalpun --- libavformat/apc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/apc.c') diff --git a/libavformat/apc.c b/libavformat/apc.c index a4dcf660e5..b180a50c9b 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -65,7 +65,7 @@ static int apc_read_header(AVFormatContext *s) } st->codecpar->bits_per_coded_sample = 4; - st->codecpar->bit_rate = st->codecpar->bits_per_coded_sample * st->codecpar->channels + st->codecpar->bit_rate = (int64_t)st->codecpar->bits_per_coded_sample * st->codecpar->channels * st->codecpar->sample_rate; st->codecpar->block_align = 1; -- cgit v1.2.1