X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/5dcfc065d123f6643b12ed1766c7976e58b6941a..a78895812191386f2da97e3795247d0ab9cc5e91:/plugins/tracklength-gstreamer.c diff --git a/plugins/tracklength-gstreamer.c b/plugins/tracklength-gstreamer.c index 0d37a09..93622fe 100644 --- a/plugins/tracklength-gstreamer.c +++ b/plugins/tracklength-gstreamer.c @@ -20,8 +20,6 @@ */ #include "tracklength.h" -#include "speaker-protocol.h" - /* Ugh. It turns out that libxml tries to define a function called * `attribute', and it's included by GStreamer for some unimaginable reason. * So undefine it here. We'll want GCC attributes for special effects, but @@ -72,7 +70,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);