From 2ce1e749a8986a7baf2cd2c87ccd28c9355c4adb Mon Sep 17 00:00:00 2001 From: Sebastian Jansson Date: Wed, 14 Mar 2018 12:25:05 +0100 Subject: [PATCH] Setting rate before callback in network control handler. last_target_rate_ is used to retrieve the bandwidth in the callback handler in RtpTransportControllerSend. If last_target_rate_ is not set before the callback in OnNetworkInvalidation, the value will be outdated. Bug: webrtc:8415 Change-Id: Ic6f898db212a02c2afa1997840e3c4929bb7f0f7 Reviewed-on: https://webrtc-review.googlesource.com/61720 Reviewed-by: Philip Eliasson Commit-Queue: Sebastian Jansson Cr-Commit-Position: refs/heads/master@{#22428} --- .../rtp/send_side_congestion_controller.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/congestion_controller/rtp/send_side_congestion_controller.cc b/modules/congestion_controller/rtp/send_side_congestion_controller.cc index fcd48ce645..1e4dacb953 100644 --- a/modules/congestion_controller/rtp/send_side_congestion_controller.cc +++ b/modules/congestion_controller/rtp/send_side_congestion_controller.cc @@ -172,8 +172,8 @@ void ControlHandler::OnProbeClusterConfig(ProbeClusterConfig config) { void ControlHandler::OnTargetTransferRate(TargetTransferRate target_rate) { RTC_DCHECK_CALLED_SEQUENTIALLY(&sequenced_checker_); current_target_rate_msg_ = target_rate; - OnNetworkInvalidation(); last_target_rate_ = target_rate; + OnNetworkInvalidation(); } void ControlHandler::OnNetworkAvailability(NetworkAvailability msg) {