提交 1068feff authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Modify RtpListener rules to deal with…

Modify RtpListener rules to deal with https://github.com/openpeer/ortc/pull/557#issuecomment-223127011 (solution 2 implemented)
上级 6872bd62
差异被折叠。
......@@ -187,7 +187,10 @@ namespace RTC
}
}
// Add entries into ptTable (just if no encoding.ssrc is given).
// Add entries into ptTable just if:
// - Not all the encoding.ssrc are given, or
// - Not all the encoding.rtx.ssrc are given, or
// - Not all the encoding.fec.ssrc are given.
{
auto it = rtpParameters->encodings.begin();
......@@ -195,19 +198,20 @@ namespace RTC
{
auto encoding = *it;
if (encoding.ssrc)
if (
!encoding.ssrc ||
(encoding.hasRtx && !encoding.rtx.ssrc) ||
(encoding.hasFec && !encoding.fec.ssrc))
{
break;
}
}
if (it == rtpParameters->encodings.end())
if (it != rtpParameters->encodings.end())
{
for (auto& codec : rtpParameters->codecs)
{
uint8_t payloadType;
// Check encoding.ssrc.
payloadType = codec.payloadType;
uint8_t payloadType = codec.payloadType;
if (!this->HasPayloadType(payloadType, rtpReceiver))
{
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论