From 83f5e5c28c68443d1fd85bcdd1f190d46783467e Mon Sep 17 00:00:00 2001 Message-Id: <83f5e5c28c68443d1fd85bcdd1f190d46783467e.1715327729.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 13 Jul 2018 11:55:02 +0100 Subject: [PATCH] plugins/tracklength-gstreamer.c: Use `GST_SECOND' instead of `1000...'. Organization: Straylight/Edgeware From: Mark Wooding Honestly I'm rather surprised that I typed the right number of zeroes. --- plugins/tracklength-gstreamer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tracklength-gstreamer.c b/plugins/tracklength-gstreamer.c index 0d37a09..7297eae 100644 --- a/plugins/tracklength-gstreamer.c +++ b/plugins/tracklength-gstreamer.c @@ -72,7 +72,7 @@ long disorder_tracklength(const char UNUSED *track, const char *path) { switch(gst_discoverer_info_get_result(info)) { case GST_DISCOVERER_OK: t = gst_discoverer_info_get_duration(info); - length = (t + 500000000)/1000000000; + length = (t + GST_SECOND/2)/GST_SECOND; break; case GST_DISCOVERER_TIMEOUT: disorder_info("discovery timed out probing `%s'", path); -- [mdw]