From 6b54f14dfe11900beb06af7ab9fbc76f1f77d35b Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 1 Feb 2022 15:20:43 +0100 Subject: [PATCH] Display correct maxBitrate in statistics. --- rtpconn/rtpstats.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtpconn/rtpstats.go b/rtpconn/rtpstats.go index d10f57f..0fcde0d 100644 --- a/rtpconn/rtpstats.go +++ b/rtpconn/rtpstats.go @@ -56,6 +56,7 @@ func (c *webClient) GetStats() *stats.Client { tid := layer.tid maxTid := layer.maxTid rate, _ := t.rate.Estimate() + maxRate, _, _ := t.GetMaxBitrate() rtt := rtptime.ToDuration(t.getRTT(), rtptime.JiffiesPerSec) loss, jitter := t.stats.Get(jiffies) @@ -67,7 +68,7 @@ func (c *webClient) GetStats() *stats.Client { Sid: &sid, MaxSid: &maxSid, Bitrate: uint64(rate) * 8, - MaxBitrate: t.maxBitrate.Get(jiffies), + MaxBitrate: maxRate, Loss: float64(loss) / 256.0, Rtt: stats.Duration(rtt), Jitter: stats.Duration(j),