hlsdemux: Prevent rounding errors due to division by using gst_util_uint64_scale()

This commit is contained in:
Sebastian Dröge 2014-02-12 15:33:06 +01:00
parent 6e54b8ee53
commit 4dcacc1773

View file

@ -1255,8 +1255,8 @@ gst_hls_demux_schedule (GstHLSDemux * demux)
/* schedule the next update using the target duration field of the
* playlist */
demux->next_update +=
gst_m3u8_client_get_current_fragment_duration (demux->client)
/ GST_SECOND * G_USEC_PER_SEC * update_factor;
gst_util_uint64_scale (gst_m3u8_client_get_current_fragment_duration
(demux->client), G_USEC_PER_SEC * update_factor, GST_SECOND);
GST_DEBUG_OBJECT (demux, "Next update scheduled at %" G_GINT64_FORMAT,
demux->next_update);