diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-12-13 00:38:25 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-12-14 01:06:55 +0100 |
commit | ad5807f8aa883bee5431186dc1f24c5435d722d3 (patch) | |
tree | d0d6dde8533ca046e122fe5bb7b35ee81b45cdac /libavformat/iff.c | |
parent | 2b0112d42d4dfc8976be20b4d9729c0e077146c6 (diff) | |
download | ffmpeg-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/iff.c')
-rw-r--r-- | libavformat/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index bf44170193..29fb7bf139 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -748,7 +748,7 @@ static int iff_read_header(AVFormatContext *s) } st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id); - st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; + st->codecpar->bit_rate = (int64_t)st->codecpar->channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; st->codecpar->block_align = st->codecpar->channels * st->codecpar->bits_per_coded_sample; if (st->codecpar->codec_tag == ID_DSD && st->codecpar->block_align <= 0) return AVERROR_INVALIDDATA; |