Fix BitrateControllerImpl not to ignore BW probe results mid-call.
Previously when BitrateControllerImpl::OnDelayBasedBweResult() is
called as result of a probe it was calling
bandwidth_estimation_.SetSendBitrate(), but not
UpdateDelayBasedEstimate(). As result SendSideBandwidthEstimation was
effectively ignoring probe results as it kept the old
delay_based_bitrate_bps_ value, which caps the resulting bitrate.
BUG=webrtc:6332,webrtc:6710
Review-Url: https://codereview.webrtc.org/2481383002
Cr-Commit-Position: refs/heads/master@{#15071}
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
index a33d97e..be0e0f1 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc
@@ -189,11 +189,10 @@
return;
{
rtc::CritScope cs(&critsect_);
+ bandwidth_estimation_.UpdateDelayBasedEstimate(clock_->TimeInMilliseconds(),
+ result.target_bitrate_bps);
if (result.probe) {
bandwidth_estimation_.SetSendBitrate(result.target_bitrate_bps);
- } else {
- bandwidth_estimation_.UpdateDelayBasedEstimate(
- clock_->TimeInMilliseconds(), result.target_bitrate_bps);
}
}
MaybeTriggerOnNetworkChanged();