adaptivedemux: fixed clock compensation in get_fragment_waiting_time
authorFlorin Apostol <florin.apostol@oregan.net>
Wed, 16 Dec 2015 10:23:23 +0000 (10:23 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 16 Dec 2015 10:36:35 +0000 (11:36 +0100)
Clock compensation is calculated in usec but is added to a GstClockTime value.

https://bugzilla.gnome.org/show_bug.cgi?id=759534

ext/dash/gstdashdemux.c

index 27988f5..e5b5d24 100644 (file)
@@ -1477,7 +1477,8 @@ gst_dash_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream *
     /* subtract the server's clock drift, so that if the server's
        time is behind our idea of UTC, we need to sleep for longer
        before requesting a fragment */
-    return diff - gst_dash_demux_get_clock_compensation (dashdemux);
+    return diff -
+        gst_dash_demux_get_clock_compensation (dashdemux) * GST_USECOND;
   }
   return 0;
 }