[FFmpeg-cvslog] lavf: fix the comparison in an overflow check

Anton Khirnov git at videolan.org
Thu Sep 26 00:36:34 CEST 2013


ffmpeg | branch: release/0.10 | Anton Khirnov <anton at khirnov.net> | Wed Sep  4 08:55:08 2013 +0200| [9978c24abfbbde6d5db80bf8e6ff9b525ef8c42d] | committer: Sean McGovern

lavf: fix the comparison in an overflow check

CC: libav-stable at libav.org

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 26f027fba1c5ab482fa2488fbe0fa36c8bb33b69)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9978c24abfbbde6d5db80bf8e6ff9b525ef8c42d
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index e31c579..7065b2f 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1954,7 +1954,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;
                 }



More information about the ffmpeg-cvslog mailing list