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

Code cleanup

上级 1a7646a4
...@@ -135,8 +135,8 @@ namespace RTC ...@@ -135,8 +135,8 @@ namespace RTC
if (this->nackList.size() + numNewNacks > MaxNackPackets) if (this->nackList.size() + numNewNacks > MaxNackPackets)
{ {
MS_DEBUG_TAG( MS_DEBUG_TAG(
rtx, rtx,
"NACK list too large, clearing it and requesting a key frame [seq32End:%" PRIu32 "]", "NACK list too large, clearing it and requesting a key frame [seq32End:%" PRIu32 "]",
seq32End); seq32End);
this->nackList.clear(); this->nackList.clear();
......
...@@ -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 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论