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/bfi.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/bfi.c')
-rw-r--r-- | libavformat/bfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/bfi.c b/libavformat/bfi.c index ef4c17dddb..6c98e33ab4 100644 --- a/libavformat/bfi.c +++ b/libavformat/bfi.c @@ -108,7 +108,7 @@ static int bfi_read_header(AVFormatContext * s) astream->codecpar->channel_layout = AV_CH_LAYOUT_MONO; astream->codecpar->bits_per_coded_sample = 8; astream->codecpar->bit_rate = - astream->codecpar->sample_rate * astream->codecpar->bits_per_coded_sample; + (int64_t)astream->codecpar->sample_rate * astream->codecpar->bits_per_coded_sample; avio_seek(pb, chunk_header - 3, SEEK_SET); avpriv_set_pts_info(astream, 64, 1, astream->codecpar->sample_rate); return 0; |