Le 2014-09-08 22:20, Gabriel Dume a écrit :
Leftover of 56d7df91e010a177a80cfc8dbe394305
---
 libavutil/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/time.c b/libavutil/time.c
index e833cd0..42497da 100644
--- a/libavutil/time.c
+++ b/libavutil/time.c
@@ -41,7 +41,7 @@ int64_t av_gettime(void)
 #if HAVE_CLOCK_GETTIME
     struct timespec ts;
     clock_gettime(CLOCK_MONOTONIC, &ts);
-    return (int64_t)ts.tv_sec * 100000 + ts.tv_nsec / 1000;
+    return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;

The original code is still wrong by the way. If _POSIX_MONOTONIC_CLOCK is zero (as on GNU/libc), then availability of the clock needs to be checked at run-time. Nominally, sysconf(_SC_MONOTONIC_CLOCK) does it.

--
Rémi Denis-Courmont
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to