From 92e7d8837e04dde8fa7bdca94cacf15df9810952 Mon Sep 17 00:00:00 2001 From: yujitai Date: Thu, 23 Nov 2023 21:35:23 +0800 Subject: [PATCH] =?UTF-8?q?RTC:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E7=BB=84?= =?UTF-8?q?=E4=B8=A2=E5=8C=85=E5=88=86=E5=A4=9A=E6=AC=A1nack=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=97=B6blp-vector=E6=B2=A1=E6=9C=89=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98=20(#3016)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如果一组丢包,通过多个nack发送,那么多次执行blp_vec.resize(16, false)并不会重置元素值,这会导致blp_vec的丢包状态错乱,从而产生一些不必要的重传请求。 --- webrtc/Nack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/Nack.cpp b/webrtc/Nack.cpp index 8012a16c..a12bfa7e 100644 --- a/webrtc/Nack.cpp +++ b/webrtc/Nack.cpp @@ -258,7 +258,7 @@ uint64_t NackContext::reSendNack() { for (auto it = nack_rtp.begin(); it != nack_rtp.end();) { if (pid == -1) { pid = *it; - vec.resize(FCI_NACK::kBitSize, false); + vec.assign(FCI_NACK::kBitSize, false); ++it; continue; }