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

Code cleanup

上级 1a7646a4
...@@ -182,11 +182,10 @@ namespace RTC ...@@ -182,11 +182,10 @@ namespace RTC
if (currentSeq32 == seq32) if (currentSeq32 == seq32)
{ {
auto currentPacket = (*bufferIt).packet; auto currentPacket = (*bufferIt).packet;
uint32_t diff = uint32_t diffMs = now - this->lastPacketTimeMs;
(this->maxTimestamp - currentPacket->GetTimestamp()) * 1000 / this->params.clockRate;
// Just provide the packet if no older than MaxRetransmissionDelay ms. // Just provide the packet if no older than MaxRetransmissionDelay ms.
if (diff > MaxRetransmissionDelay) if (diffMs > MaxRetransmissionDelay)
{ {
if (!tooOldPacketFound) if (!tooOldPacketFound)
{ {
...@@ -196,7 +195,7 @@ namespace RTC ...@@ -196,7 +195,7 @@ namespace RTC
"[seq:%" PRIu16 ", max age:%" PRIu32 "ms, packet age:%" PRIu32 "ms]", "[seq:%" PRIu16 ", max age:%" PRIu32 "ms, packet age:%" PRIu32 "ms]",
currentPacket->GetSequenceNumber(), currentPacket->GetSequenceNumber(),
MaxRetransmissionDelay, MaxRetransmissionDelay,
diff); diffMs);
tooOldPacketFound = true; tooOldPacketFound = true;
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论