提交 0c26392a authored 作者: José Luis Millán's avatar José Luis Millán

Score: make sure 'lost' is never greater than 'sent'

上级 3a1f3ac5
...@@ -384,6 +384,9 @@ namespace RTC ...@@ -384,6 +384,9 @@ namespace RTC
else else
lost = expected - received; lost = expected - received;
if (lost > received)
lost = received;
// Calculate number of packets repaired in this interval. // Calculate number of packets repaired in this interval.
auto totalRepaired = this->packetsRepaired; auto totalRepaired = this->packetsRepaired;
uint32_t repaired = totalRepaired - this->repairedPrior; uint32_t repaired = totalRepaired - this->repairedPrior;
......
...@@ -539,6 +539,9 @@ namespace RTC ...@@ -539,6 +539,9 @@ namespace RTC
return; return;
} }
if (lost > sent)
lost = sent;
if (repaired > lost) if (repaired > lost)
{ {
if (HasRtx()) if (HasRtx())
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论