From 4942a0f5741e8e2cba92f5f039aa935e1cf60c07 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 5 Mar 2023 21:54:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96nack=E9=87=8D=E4=BC=A0rtt?= =?UTF-8?q?=E9=97=B4=E9=9A=94=E6=97=B6=E9=97=B4=E4=BC=B0=E7=AE=97=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Nack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/Nack.cpp b/webrtc/Nack.cpp index ec22e750..876f9fa1 100644 --- a/webrtc/Nack.cpp +++ b/webrtc/Nack.cpp @@ -201,7 +201,8 @@ void NackContext::clearNackStatus(uint16_t seq) { if (it == _nack_send_status.end()) { return; } - auto rtt = getCurrentMillisecond() - it->second.update_stamp; + //收到重传包与第一个nack包间的时间约等于rtt时间 + auto rtt = getCurrentMillisecond() - it->second.first_stamp; _nack_send_status.erase(it); if (rtt >= 0) {