Commit 26f027fb authored by Anton Khirnov's avatar Anton Khirnov Committed by Luca Barbato

lavf: fix the comparison in an overflow check

CC: libav-stable@libav.org
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 7ee191ca
......@@ -1758,7 +1758,7 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (st->codec->bit_rate > 0) {
if (INT_MAX - st->codec->bit_rate > bit_rate) {
if (INT_MAX - st->codec->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