avidec/guess_ni_flag: fix harmless integer overflow
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Sep 2012 14:56:59 +0000 (16:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Sep 2012 14:56:59 +0000 (16:56 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avidec.c

index 5abb9de..3e85d4e 100644 (file)
@@ -1341,7 +1341,7 @@ static int guess_ni_flag(AVFormatContext *s){
     if (last_start > first_end)
         return 1;
     idx= av_mallocz(sizeof(*idx) * s->nb_streams);
-    for (min_pos=pos=0; min_pos!=INT64_MAX; pos= min_pos+1) {
+    for (min_pos=pos=0; min_pos!=INT64_MAX; pos= min_pos+1LU) {
         int64_t max_dts = INT64_MIN/2, min_dts= INT64_MAX/2;
         min_pos = INT64_MAX;