Commit ab648f79 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/avidec: Do not test for bitrate <= INT_MAX.

AVCodecContext->bit_rate is int64_t since 7404f3bd

Unbreaks non-interleaved detection of v210 4k avi files, broken since 0eec40b7.
Reported-by: Xavier Càmara, Centre de Conservació i Restauració, Filmoteca de Catalunya
parent c9671289
...@@ -456,7 +456,7 @@ static int calculate_bitrate(AVFormatContext *s) ...@@ -456,7 +456,7 @@ static int calculate_bitrate(AVFormatContext *s)
continue; continue;
duration = st->index_entries[j-1].timestamp - st->index_entries[0].timestamp; duration = st->index_entries[j-1].timestamp - st->index_entries[0].timestamp;
bitrate = av_rescale(8*len, st->time_base.den, duration * st->time_base.num); bitrate = av_rescale(8*len, st->time_base.den, duration * st->time_base.num);
if (bitrate <= INT_MAX && bitrate > 0) { if (bitrate > 0) {
st->codecpar->bit_rate = bitrate; st->codecpar->bit_rate = bitrate;
} }
} }
......
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