X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/04c0301cad7bd266b7d4f9be011b4e4feff78dd8..83f5e5c28c68443d1fd85bcdd1f190d46783467e:/plugins/tracklength-gstreamer.c 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);