From: Mark Wooding Date: Fri, 13 Jul 2018 10:55:02 +0000 (+0100) Subject: plugins/tracklength-gstreamer.c: Use `GST_SECOND' instead of `1000...'. X-Git-Tag: 5.2~23 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/83f5e5c28c68443d1fd85bcdd1f190d46783467e plugins/tracklength-gstreamer.c: Use `GST_SECOND' instead of `1000...'. Honestly I'm rather surprised that I typed the right number of zeroes. --- 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);