[libav-stable] lavf: fix the comparison in an overflow check

Anton Khirnov git at libav.org
Sat Sep 7 11:57:46 CEST 2013


Module: libav
Branch: master
Commit: 26f027fba1c5ab482fa2488fbe0fa36c8bb33b69

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Wed Sep  4 08:55:08 2013 +0200

lavf: fix the comparison in an overflow check

CC: libav-stable at libav.org

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

---

 libavformat/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3644bcd..3065c71 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
                 }



More information about the libav-stable mailing list