diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-04-12 22:00:24 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-04-12 22:00:24 +0200 |
commit | 907939540035984a345a754f0ff4884d07d6bf0b (patch) | |
tree | 3333c5d56b242f7f125979c6c5539bf0e077d3cf | |
parent | ac32d6f03bd54b5a87ceb36b48832501c034ff51 (diff) |
metric: fix average bitrate calculation
-rw-r--r-- | src/metric.c | 2 | ||||
-rw-r--r-- | src/stream.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/metric.c b/src/metric.c index 8cc0b18..f509805 100644 --- a/src/metric.c +++ b/src/metric.c @@ -75,5 +75,5 @@ uint32_t metric_avg_bitrate(const struct metric *metric) diff = (int)(tmr_jiffies() - metric->ts_start); - return 1000 * 8 * metric->n_bytes / diff; + return 1000 * 8 * (metric->n_bytes / diff); } diff --git a/src/stream.c b/src/stream.c index 74170b3..22dfa96 100644 --- a/src/stream.c +++ b/src/stream.c @@ -72,7 +72,7 @@ static inline int lostcalc(struct stream *s, uint16_t seq) } -static void print_rtp_stats(struct stream *s) +static void print_rtp_stats(const struct stream *s) { info("\n%-9s Transmit: Receive:\n" "packets: %7u %7u\n" |