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 <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22428}
This commit is contained in:
Sebastian Jansson
2018-03-14 12:25:05 +01:00
committed by Commit Bot
parent a03585f611
commit 2ce1e749a8

View File

@ -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) {