projects
/
platform
/
upstream
/
gst-plugins-bad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a246a8
)
hlsdemux: Fix bitrate calculation
author
Sebastian Dröge
<sebastian@centricular.com>
Mon, 10 Feb 2014 17:21:38 +0000
(18:21 +0100)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 10 Feb 2014 17:35:07 +0000
(18:35 +0100)
g_get_monotonic_time() returns microseconds, not nanoseconds.
ext/hls/gsthlsdemux.c
patch
|
blob
|
history
diff --git
a/ext/hls/gsthlsdemux.c
b/ext/hls/gsthlsdemux.c
index 0af22b295813f2665c4eedf156327323d7304a47..37b03a89eb887ace294981fbbfba6a3f2f57d160 100644
(file)
--- 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 / G
ST_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);