chiark / gitweb /
plugins/tracklength-gstreamer.c: Remove unused header inclusion.
[disorder] / plugins / tracklength-gstreamer.c
index 0d37a097094f7181fd5734396259503fe565fc30..93622fec41df0622d71011d7e033536d09f7f38a 100644 (file)
@@ -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);