OSDN Git Service

lavf: fix the comparison in an overflow check
authorAnton Khirnov <anton@khirnov.net>
Wed, 4 Sep 2013 06:55:08 +0000 (08:55 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 7 Sep 2013 09:52:40 +0000 (11:52 +0200)
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/utils.c

index 3644bcd..3065c71 100644 (file)
@@ -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;
                 }