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

Fix effective profile calculation

上级 24e6b99c
...@@ -596,8 +596,20 @@ namespace RTC ...@@ -596,8 +596,20 @@ namespace RTC
// Otherwise take the highest available profile equal or lower than the preferred. // Otherwise take the highest available profile equal or lower than the preferred.
else else
{ {
auto it = this->profiles.lower_bound(this->preferredProfile); std::set<RtpEncodingParameters::Profile>::reverse_iterator it;
newProfile = *it;
newProfile = RtpEncodingParameters::Profile::NONE;
for (it = this->profiles.rbegin(); it != this->profiles.rend(); ++it)
{
auto profile = *it;
if (profile <= this->preferredProfile)
{
newProfile = *it;
break;
}
}
} }
if (newProfile == this->effectiveProfile) if (newProfile == this->effectiveProfile)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论