Commit 4fecb97f authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: change bit_rate to 64 bit in estimate_timings_from_bit_rate()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a9eda4b2
......@@ -2565,11 +2565,11 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
/* if bit_rate is already set, we believe it */
if (ic->bit_rate <= 0) {
int bit_rate = 0;
int64_t bit_rate = 0;
for (i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
if (st->codecpar->bit_rate > 0) {
if (INT_MAX - st->codecpar->bit_rate < bit_rate) {
if (INT64_MAX - st->codecpar->bit_rate < bit_rate) {
bit_rate = 0;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment