]> git.sesse.net Git - ffmpeg/commitdiff
dump: Use the correct abs() version
authorVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 30 Jun 2015 13:38:46 +0000 (15:38 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 30 Jun 2015 23:13:58 +0000 (00:13 +0100)
Fix warning from clang "absolute value function 'abs' given an argument
of type 'long long' but has parameter of type 'int' which may cause
truncation of value [-Wabsolute-value]".

libavformat/dump.c

index 3248e563c8e6b20c1a883770d1d220f71c647039..22ae5861469c053f7c1700389cbb8fc364024173 100644 (file)
@@ -479,7 +479,7 @@ void av_dump_format(AVFormatContext *ic, int index,
             int secs, us;
             av_log(NULL, AV_LOG_INFO, ", start: ");
             secs = ic->start_time / AV_TIME_BASE;
-            us   = abs(ic->start_time % AV_TIME_BASE);
+            us   = llabs(ic->start_time % AV_TIME_BASE);
             av_log(NULL, AV_LOG_INFO, "%d.%06d",
                    secs, (int) av_rescale(us, 1000000, AV_TIME_BASE));
         }