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

Cosmetic fixes in RtpStreamSend

上级 169f0883
...@@ -154,15 +154,11 @@ namespace RTC ...@@ -154,15 +154,11 @@ namespace RTC
// If no Sender Report was received by the remote endpoint yet, ignore lastSr // If no Sender Report was received by the remote endpoint yet, ignore lastSr
// and dlsr values in the Receiver Report. // and dlsr values in the Receiver Report.
if (!lastSr || !dlsr) if (lastSr && dlsr && (compactNtp > dlsr + lastSr))
rtt = 0;
else if (compactNtp > dlsr + lastSr)
rtt = compactNtp - dlsr - lastSr; rtt = compactNtp - dlsr - lastSr;
else
rtt = 0;
// RTT in milliseconds. // RTT in milliseconds.
this->rtt = (rtt >> 16) * 1000; this->rtt = static_cast<float>(rtt >> 16) * 1000;
this->rtt += (static_cast<float>(rtt & 0x0000FFFF) / 65536) * 1000; this->rtt += (static_cast<float>(rtt & 0x0000FFFF) / 65536) * 1000;
if (this->rtt > 0.0f) if (this->rtt > 0.0f)
...@@ -207,7 +203,7 @@ namespace RTC ...@@ -207,7 +203,7 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
auto& cname = GetCname(); const auto& cname = GetCname();
auto* sdesChunk = new RTC::RTCP::SdesChunk(GetSsrc()); auto* sdesChunk = new RTC::RTCP::SdesChunk(GetSsrc());
auto* sdesItem = auto* sdesItem =
new RTC::RTCP::SdesItem(RTC::RTCP::SdesItem::Type::CNAME, cname.size(), cname.c_str()); new RTC::RTCP::SdesItem(RTC::RTCP::SdesItem::Type::CNAME, cname.size(), cname.c_str());
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论