From b4cdd62bb1e8ab5ddf53b0573d8f8c530c11df5a Mon Sep 17 00:00:00 2001 From: Jakob Ivarsson Date: Thu, 13 Feb 2020 14:01:26 +0100 Subject: [PATCH] Update transport overhead the first time the network connects. This fixes a bug where transport_overhead_bytes_per_packet_ is sometimes not set and therefore not included in the BWE. Bug: webrtc:11359 Change-Id: Id3593299c6bcd7ce3c44a7b148c202240b3f1981 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168525 Reviewed-by: Christoffer Rodbro Reviewed-by: Sebastian Jansson Commit-Queue: Jakob Ivarsson Cr-Commit-Position: refs/heads/master@{#30522} --- call/rtp_transport_controller_send.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc index 6d66c3a3bb..e80713c7d3 100644 --- a/call/rtp_transport_controller_send.cc +++ b/call/rtp_transport_controller_send.cc @@ -259,6 +259,10 @@ void RtpTransportControllerSend::OnNetworkRouteChanged( auto kv = result.first; bool inserted = result.second; if (inserted) { + task_queue_.PostTask([this, network_route] { + RTC_DCHECK_RUN_ON(&task_queue_); + transport_overhead_bytes_per_packet_ = network_route.packet_overhead; + }); // No need to reset BWE if this is the first time the network connects. return; }