mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 11:42:25 +00:00
Avoid divide-by-zero and NaN (#1656)
This commit is contained in:
1 parent
5751b8c082
commit
9db46bb866
1 file changed
+1
-1
@@ -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