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

RtpStreamSend: correctly call OnRtpStreamInactivity and OnRtpStreamHealthy

上级 da9879c9
......@@ -229,10 +229,19 @@ namespace RTC
void RtpStreamRecv::CheckHealth()
{
MS_TRACE();
auto now = DepLibUV::GetTime();
if (this->transmissionCounter.GetRate(now) == 0 && IsHealthy())
if (this->transmissionCounter.GetRate(now) == 0 && this->healthy)
{
this->listener->OnRtpStreamInactivity(this);
}
else if (!this->healthy)
{
this->healthy = true;
this->listener->OnRtpStreamHealthy(this);
}
}
void RtpStreamRecv::OnNackGeneratorNackRequired(const std::vector<uint16_t>& seqNumbers)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论