From 59b82d49516926173ab03944a73fd7fc9e5d7bcc Mon Sep 17 00:00:00 2001
From: Allan Cady <allancady@yahoo.com>
Date: Tue, 26 Mar 2019 14:11:03 -0700
Subject: [PATCH] Fix loss of precision for silencedetect on large files

---
 libavutil/timestamp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h
index e082f01b40..04b719f0aa 100644
--- a/libavutil/timestamp.h
+++ b/libavutil/timestamp.h
@@ -65,7 +65,7 @@ static inline char *av_ts_make_string(char *buf, int64_t ts)
 static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
 {
     if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
-    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
+    else                      snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.3f", av_q2d(*tb) * ts);
     return buf;
 }
 
-- 
2.17.1

