Code inspection (#581)

* Code inspection

* fix [4]int64 conversiong
This commit is contained in:
David Colburn
2022-03-30 13:49:53 -07:00
committed by GitHub
parent 26f7bb498a
commit 0b8a180554
77 changed files with 228 additions and 151 deletions
+5 -4
View File
@@ -7,13 +7,14 @@ import (
"sync"
"time"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/pion/interceptor/pkg/cc"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v3"
"go.uber.org/atomic"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/livekit-server/pkg/config"
)
@@ -864,7 +865,7 @@ func (s *StreamAllocator) finalizeProbe() {
// reset probe interval on a successful probe
s.resetProbeInterval()
// probe estimate is same or higher, commit it and try allocate deficient tracks
// probe estimate is same or higher, commit it and try to allocate deficient tracks
s.params.Logger.Infow(
"successful probe, updating channel capacity",
"old(bps)", s.committedChannelCapacity,
@@ -1597,7 +1598,7 @@ func (c *ChannelObserver) GetHighestEstimate() int64 {
}
func (c *ChannelObserver) GetNackRatio() float64 {
ratio := float64(0.0)
ratio := 0.0
if c.packets != 0 {
ratio = float64(c.repeatedNacks) / float64(c.packets)
if ratio > 1.0 {