summaryrefslogtreecommitdiffstats
path: root/libavformat/voc_packet.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-12-13 00:38:25 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-12-14 01:06:55 +0100
commitad5807f8aa883bee5431186dc1f24c5435d722d3 (patch)
treed0d6dde8533ca046e122fe5bb7b35ee81b45cdac /libavformat/voc_packet.c
parent2b0112d42d4dfc8976be20b4d9729c0e077146c6 (diff)
downloadffmpeg-streaming-ad5807f8aa883bee5431186dc1f24c5435d722d3.zip
ffmpeg-streaming-ad5807f8aa883bee5431186dc1f24c5435d722d3.tar.gz
avformat: fix overflows during bit rate calculation
The bit_rate field has type int64_t since commit 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat/voc_packet.c')
-rw-r--r--libavformat/voc_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/voc_packet.c b/libavformat/voc_packet.c
index 0d56436..4f60467 100644
--- a/libavformat/voc_packet.c
+++ b/libavformat/voc_packet.c
@@ -126,7 +126,7 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
}
}
- par->bit_rate = par->sample_rate * par->channels * par->bits_per_coded_sample;
+ par->bit_rate = (int64_t)par->sample_rate * par->channels * par->bits_per_coded_sample;
if (max_size <= 0)
max_size = 2048;
OpenPOWER on IntegriCloud