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}
This commit is contained in:
sergeyu
2016-11-14 10:52:58 -08:00
committed by Commit bot
parent 80c06fa574
commit 26b675625f

View File

@ -189,11 +189,10 @@ void BitrateControllerImpl::OnDelayBasedBweResult(
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();