Unverified 提交 22a5f5fd authored 作者: Lynnworld's avatar Lynnworld 提交者: GitHub

Fix #492 SimulcastConsumer cannot switch layers if initial…

Fix #492 SimulcastConsumer cannot switch layers if initial tsReferenceSpatialLayer disappears (#1459)
上级 173474c9
...@@ -1574,7 +1574,9 @@ namespace RTC ...@@ -1574,7 +1574,9 @@ namespace RTC
MS_TRACE(); MS_TRACE();
// If we don't have yet a RTP timestamp reference, set it now. // If we don't have yet a RTP timestamp reference, set it now.
if (newTargetSpatialLayer != -1 && this->tsReferenceSpatialLayer == -1) if (
newTargetSpatialLayer != -1 && (this->tsReferenceSpatialLayer == -1 ||
!GetProducerTsReferenceRtpStream()->GetSenderReportNtpMs()))
{ {
MS_DEBUG_TAG( MS_DEBUG_TAG(
simulcast, "using spatial layer %" PRIi16 " as RTP timestamp reference", newTargetSpatialLayer); simulcast, "using spatial layer %" PRIi16 " as RTP timestamp reference", newTargetSpatialLayer);
...@@ -1646,10 +1648,7 @@ namespace RTC ...@@ -1646,10 +1648,7 @@ namespace RTC
return ( return (
this->tsReferenceSpatialLayer == -1 || this->tsReferenceSpatialLayer == -1 ||
spatialLayer == this->tsReferenceSpatialLayer || spatialLayer == this->tsReferenceSpatialLayer ||
(
GetProducerTsReferenceRtpStream()->GetSenderReportNtpMs() &&
this->producerRtpStreams.at(spatialLayer)->GetSenderReportNtpMs() this->producerRtpStreams.at(spatialLayer)->GetSenderReportNtpMs()
)
); );
// clang-format on // clang-format on
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论