From 777bc81a91a476f9e1f81faebfb952b823f13f28 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 4 Sep 2013 08:55:08 +0200 Subject: [PATCH] lavf: fix the comparison in an overflow check CC: libav-stable@libav.org Signed-off-by: Luca Barbato (cherry picked from commit 26f027fba1c5ab482fa2488fbe0fa36c8bb33b69) Signed-off-by: Luca Barbato --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 27d9d06667..4f73dfebef 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1864,7 +1864,7 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic) for(i=0;inb_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; }