From 528ec3db0b873b6d4c0e79a848057d33084e5fb4 Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 16 Dec 2016 02:11:26 -0800 Subject: [PATCH] Don't report packets with id -1 to the transport feedback adapter as they provide no value. This also avoids an issue where -1 is interpreted as 0xFFFF by the feedback adapter, which in practice likely isn't a problem, but still wrong. BUG=None Review-Url: https://codereview.webrtc.org/2579263002 Cr-Commit-Position: refs/heads/master@{#15647} --- webrtc/modules/congestion_controller/congestion_controller.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webrtc/modules/congestion_controller/congestion_controller.cc b/webrtc/modules/congestion_controller/congestion_controller.cc index 44b2f41e86..bbdd968dc6 100644 --- a/webrtc/modules/congestion_controller/congestion_controller.cc +++ b/webrtc/modules/congestion_controller/congestion_controller.cc @@ -290,6 +290,10 @@ void CongestionController::SignalNetworkState(NetworkState state) { } void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { + // We're not interested in packets without an id, which may be stun packets, + // etc, sent on the same transport. + if (sent_packet.packet_id == -1) + return; transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, sent_packet.send_time_ms); }