diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-02-10 18:21:38 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-02-10 18:35:07 +0100 |
commit | 2ebca071559d9460ccc9fefc6b7537b9aa58b1dc (patch) | |
tree | d03ccedd4734ffa1aa734c64aab95b2dd35fc671 | |
parent | 6a246a890b202b291537039e9c5cf64120ca4702 (diff) | |
download | gstreamer-plugins-bad-2ebca071559d9460ccc9fefc6b7537b9aa58b1dc.tar.gz |
hlsdemux: Fix bitrate calculation
g_get_monotonic_time() returns microseconds, not nanoseconds.
-rw-r--r-- | ext/hls/gsthlsdemux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 0af22b295..37b03a89e 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -1231,7 +1231,7 @@ gst_hls_demux_switch_playlist (GstHLSDemux * demux) diff = (GST_TIMEVAL_TO_TIME (now) - GST_TIMEVAL_TO_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); |