summaryrefslogtreecommitdiff
path: root/gst/rtpmanager/rtpstats.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-09-13 15:44:52 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2010-09-13 15:51:20 +0200
commitd541f5e24db9c88abeb29be9c134636934c0f131 (patch)
tree56afa3174cb44864d79c6c8f8fb4b107aa965f3c /gst/rtpmanager/rtpstats.c
parent1f17b334ff2c31061dbeff0a5b42b77872cdb97e (diff)
downloadgstreamer-plugins-good-d541f5e24db9c88abeb29be9c134636934c0f131.tar.gz
rtpsession: Small cleanups
Make the property description prettier. Actually multiple the bandwidth with the fraction.
Diffstat (limited to 'gst/rtpmanager/rtpstats.c')
-rw-r--r--gst/rtpmanager/rtpstats.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gst/rtpmanager/rtpstats.c b/gst/rtpmanager/rtpstats.c
index 8d1f5cfa1..a7066b5a4 100644
--- a/gst/rtpmanager/rtpstats.c
+++ b/gst/rtpmanager/rtpstats.c
@@ -58,22 +58,22 @@ rtp_stats_set_bandwidths (RTPSessionStats * stats, guint rtp_bw,
rtcp_bw = rs + rr;
/* If rtcp_bw is between 0 and 1, it is a fraction of rtp_bw */
- if (rtcp_bw > 0 && rtcp_bw < 1) {
- if (rtp_bw > 0)
+ if (rtcp_bw > 0.0 && rtcp_bw < 1.0) {
+ if (rtp_bw > 0.0)
rtcp_bw = rtp_bw * rtcp_bw;
else
- rtcp_bw = -1;
+ rtcp_bw = -1.0;
}
/* RTCP is 5% of the RTP bandwidth */
- if (rtp_bw == -1 && rtcp_bw > 0)
+ if (rtp_bw == -1 && rtcp_bw > 1.0)
rtp_bw = rtcp_bw * 20;
- else if (rtp_bw != -1 && rtcp_bw < 0)
+ else if (rtp_bw != -1 && rtcp_bw < 0.0)
rtcp_bw = rtp_bw / 20;
- else if (rtp_bw == -1 && rtcp_bw < 0) {
+ else if (rtp_bw == -1 && rtcp_bw < 0.0) {
/* nothing given, take defaults */
rtp_bw = RTP_STATS_BANDWIDTH;
- rtcp_bw = rtp_bw = RTP_STATS_RTCP_FRACTION;
+ rtcp_bw = rtp_bw * RTP_STATS_RTCP_FRACTION;
}
stats->bandwidth = rtp_bw;