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 <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30522}
This commit is contained in:
Jakob Ivarsson
2020-02-13 14:01:26 +01:00
committed by Commit Bot
parent e7c4f90651
commit b4cdd62bb1

View File

@ -259,6 +259,10 @@ void RtpTransportControllerSend::OnNetworkRouteChanged(
auto kv = result.first; auto kv = result.first;
bool inserted = result.second; bool inserted = result.second;
if (inserted) { 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. // No need to reset BWE if this is the first time the network connects.
return; return;
} }