mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
修复获取webrtc推流丢包率除0的bug
This commit is contained in:
parent
f6b4eb418f
commit
df7a3242bb
@ -612,11 +612,11 @@ public:
|
||||
}
|
||||
|
||||
int getLossRate() {
|
||||
if (!_rtcp_context.getExpectedPacketsInterval()) {
|
||||
//_rtcp_context.getExpectedPacketsInterval()取值总为零?
|
||||
auto expected = _rtcp_context.getExpectedPacketsInterval();
|
||||
if (!expected) {
|
||||
return 0;
|
||||
}
|
||||
return _rtcp_context.geLostInterval() * 100 / _rtcp_context.getExpectedPacketsInterval();
|
||||
return _rtcp_context.geLostInterval() * 100 / expected;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user