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

RTCP: Do not generate SR if effective profile is NONE

上级 5192c822
...@@ -599,7 +599,7 @@ namespace RTC ...@@ -599,7 +599,7 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (!IsEnabled() || IsPaused()) if (!IsEnabled() || IsPaused() || this->effectiveProfile == RTC::RtpEncodingParameters::Profile::NONE)
return; return;
if (static_cast<float>((now - this->lastRtcpSentTime) * 1.15) < this->maxRtcpInterval) if (static_cast<float>((now - this->lastRtcpSentTime) * 1.15) < this->maxRtcpInterval)
......
...@@ -291,13 +291,7 @@ namespace RTC ...@@ -291,13 +291,7 @@ namespace RTC
report->SetOctetCount(this->transmissionCounter.GetBytes()); report->SetOctetCount(this->transmissionCounter.GetBytes());
// Calculate RTP timestamp diff between now and last received RTP packet. // Calculate RTP timestamp diff between now and last received RTP packet.
auto diffMs = static_cast<int64_t>(now - this->maxPacketMs); auto diffMs = static_cast<int64_t>(now - this->maxPacketMs);
// Do not generate SR if no RTP was sent within the last 250ms
// not to pollute the RTP Timestamp seen by the receiver.
if (diffMs > 250)
return nullptr;
int64_t diffTs = diffMs * this->params.clockRate / 1000; int64_t diffTs = diffMs * this->params.clockRate / 1000;
// Get the NTP representation of the current timestamp. // Get the NTP representation of the current timestamp.
auto ntp = Utils::Time::TimeMs2Ntp(now); auto ntp = Utils::Time::TimeMs2Ntp(now);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论