mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
hlsdemux: Fix bitrate calculation
g_get_monotonic_time() returns microseconds, not nanoseconds.
This commit is contained in:
parent
a4847fd4db
commit
89c592ccdd
1 changed files with 1 additions and 1 deletions
|
@ -1227,7 +1227,7 @@ gst_hls_demux_switch_playlist (GstHLSDemux * demux)
|
|||
diff = g_get_monotonic_time () - demux->next_update;
|
||||
buffer = gst_fragment_get_buffer (fragment);
|
||||
size = gst_buffer_get_size (buffer);
|
||||
bitrate = (size * 8) / ((double) diff / GST_SECOND);
|
||||
bitrate = (size * 8) / ((double) diff / G_USEC_PER_SEC);
|
||||
|
||||
GST_DEBUG ("Downloaded %d bytes in %" GST_TIME_FORMAT ". Bitrate is : %d",
|
||||
(guint) size, GST_TIME_ARGS (diff), bitrate);
|
||||
|
|
Loading…
Reference in a new issue