mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
Avoid divide-by-zero and NaN (#1656)
This commit is contained in:
@@ -349,7 +349,7 @@ func (q *qualityScorer) isLayerMuted() bool {
|
||||
}
|
||||
|
||||
func (q *qualityScorer) getPacketLossWeight(stat *windowStat) float64 {
|
||||
if stat == nil {
|
||||
if stat == nil || stat.duration == 0 {
|
||||
return q.params.PacketLossWeight
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user