mirror of
https://github.com/aler9/gortsplib
synced 2025-10-03 14:26:42 +08:00
prevent RTPPacketsJitter from being NaN (#670)
This commit is contained in:
@@ -2062,7 +2062,10 @@ func (c *Client) Stats() *ClientStats {
|
||||
}
|
||||
}
|
||||
}
|
||||
return v / n
|
||||
if n != 0 {
|
||||
return v / n
|
||||
}
|
||||
return 0
|
||||
}(),
|
||||
RTCPPacketsReceived: func() uint64 {
|
||||
v := uint64(0)
|
||||
|
@@ -425,7 +425,10 @@ func (ss *ServerSession) Stats() *StatsSession {
|
||||
}
|
||||
}
|
||||
}
|
||||
return v / n
|
||||
if n != 0 {
|
||||
return v / n
|
||||
}
|
||||
return 0
|
||||
}(),
|
||||
RTCPPacketsReceived: func() uint64 {
|
||||
v := uint64(0)
|
||||
|
Reference in New Issue
Block a user