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 /* schedule the next update using the target duration field of the
* playlist */ * playlist */
demux->next_update += demux->next_update +=
gst_m3u8_client_get_current_fragment_duration (demux->client) gst_util_uint64_scale (gst_m3u8_client_get_current_fragment_duration
/ GST_SECOND * G_USEC_PER_SEC * update_factor; (demux->client), G_USEC_PER_SEC * update_factor, GST_SECOND);
GST_DEBUG_OBJECT (demux, "Next update scheduled at %" G_GINT64_FORMAT, GST_DEBUG_OBJECT (demux, "Next update scheduled at %" G_GINT64_FORMAT,
demux->next_update); demux->next_update);