From fb17778ba625fd7fc407069f8504ef090b1d7340 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 21 Jan 2021 21:19:07 +0100 Subject: [PATCH] Increase receiver report timeout. --- rtpconn/rtpconn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtpconn/rtpconn.go b/rtpconn/rtpconn.go index 54a8d16..984e377 100644 --- a/rtpconn/rtpconn.go +++ b/rtpconn/rtpconn.go @@ -53,6 +53,8 @@ func (s *receiverStats) Set(loss uint8, jitter uint32, now uint64) { atomic.StoreUint64(&s.jiffies, now) } +const receiverReportTimeout = 30 * rtptime.JiffiesPerSec + func (s *receiverStats) Get(now uint64) (uint8, uint32) { ts := atomic.LoadUint64(&s.jiffies) if now < ts || now > ts+receiverReportTimeout { @@ -61,8 +63,6 @@ func (s *receiverStats) Get(now uint64) (uint8, uint32) { return uint8(atomic.LoadUint32(&s.loss)), atomic.LoadUint32(&s.jitter) } -const receiverReportTimeout = 8 * rtptime.JiffiesPerSec - type iceConnection interface { addICECandidate(candidate *webrtc.ICECandidateInit) error flushICECandidates() error