mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 21:53:22 +00:00
Fix sequence number offset on packet drop (#1556)
This commit is contained in:
1 parent
de86ccb3df
commit
2c439b3063
6 files changed
+112
-66
No files matched your search
@@ -723,12 +723,10 @@ func (s *StreamAllocator) handleNewEstimateInNonProbe() {
|
||||
}
|
||||
|
||||
var estimateToCommit int64
|
||||
var packets, repeatedNacks uint32
|
||||
var nackRatio float64
|
||||
expectedBandwidthUsage := s.getExpectedBandwidthUsage()
|
||||
packets, repeatedNacks, nackRatio := s.channelObserver.GetNackRatio()
|
||||
switch reason {
|
||||
case ChannelCongestionReasonLoss:
|
||||
packets, repeatedNacks, nackRatio = s.channelObserver.GetNackRatio()
|
||||
estimateToCommit = int64(float64(expectedBandwidthUsage) * (1.0 - NackRatioAttenuator*nackRatio))
|
||||
default:
|
||||
estimateToCommit = s.lastReceivedEstimate
|
||||
@@ -1110,7 +1108,7 @@ func (s *StreamAllocator) initProbe(probeRateBps int64) {
|
||||
"committed", s.committedChannelCapacity,
|
||||
"lastReceived", s.lastReceivedEstimate,
|
||||
"probeRateBps", probeRateBps,
|
||||
"goalBps", expectedBandwidthUsage+probeRateBps,
|
||||
"goalBps", s.probeGoalBps,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user