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

Fix #146. Consumer: Do not access 'rtpStream' when disabled

When the Consumer is disabled 'rtpStream' is nullptr.
上级 4c4bd883
...@@ -328,9 +328,12 @@ namespace RTC ...@@ -328,9 +328,12 @@ namespace RTC
this->rtpStream = nullptr; this->rtpStream = nullptr;
} }
// Reset RTCP and RTP counter stuff. // Reset last RTCP sent time counter.
this->lastRtcpSentTime = 0; this->lastRtcpSentTime = 0;
this->retransmittedCounter.Reset();
// Reset probation.
this->isProbing = false;
this->probingProfile = RTC::RtpEncodingParameters::Profile::NONE;
} }
void Consumer::SendRtpPacket(RTC::RtpPacket* packet, RTC::RtpEncodingParameters::Profile profile) void Consumer::SendRtpPacket(RTC::RtpPacket* packet, RTC::RtpEncodingParameters::Profile profile)
...@@ -855,8 +858,13 @@ namespace RTC ...@@ -855,8 +858,13 @@ namespace RTC
newTargetProfile = *it; newTargetProfile = *it;
} }
// Not enabled. Make this the target profile.
if (!IsEnabled())
{
this->targetProfile = newTargetProfile;
}
// Ongoing probation. // Ongoing probation.
if (this->isProbing) else if (this->isProbing)
{ {
// New profile higher or equal than the one being probed. Do not upgrade. // New profile higher or equal than the one being probed. Do not upgrade.
if (newTargetProfile >= this->probingProfile) if (newTargetProfile >= this->probingProfile)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论