changeset 6465:e0d8a52ce091 libavformat

Fix formatting for negative start times (issue 2139). Patch by Christian d'Heureuse, chdh inventec ch
author cehoyos
date Tue, 07 Sep 2010 21:06:21 +0000
parents b6e3e7876e4c
children 35bb7cdfe337
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Sep 06 21:52:11 2010 +0000
+++ b/utils.c	Tue Sep 07 21:06:21 2010 +0000
@@ -3135,7 +3135,7 @@
             int secs, us;
             av_log(NULL, AV_LOG_INFO, ", start: ");
             secs = ic->start_time / AV_TIME_BASE;
-            us = ic->start_time % AV_TIME_BASE;
+            us = abs(ic->start_time % AV_TIME_BASE);
             av_log(NULL, AV_LOG_INFO, "%d.%06d",
                    secs, (int)av_rescale(us, 1000000, AV_TIME_BASE));
         }