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

Rtcp: fix dlsr calculation for Reciever Report

上级 b5856489
......@@ -382,7 +382,12 @@ namespace RTC
if (this->last_sr_received)
{
uint32_t dlsr = (DepLibUV::GetTime() - this->last_sr_received) / 1000 * 65536;
// Get delay in milliseconds.
uint32_t delayMs = (DepLibUV::GetTime() - this->last_sr_received);
// Express delay in units of 1/65536 seconds.
uint32_t dlsr = (delayMs / 1000) << 16;
dlsr |= (uint32_t)((delayMs % 1000) * 65536 / 1000);
report->SetDelaySinceLastSenderReport(dlsr);
report->SetLastSenderReport(this->last_sr_timestamp);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论