Fix mistake in range validation of WebRTC-BweBackOffFactor.
Bug: webrtc:8212
Change-Id: I89f236099736d2706b25ccc955789449c8e34853
Reviewed-on: https://webrtc-review.googlesource.com/7860
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20215}
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc
index 37c2529..25d756c 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -40,9 +40,9 @@
int parsed_values =
sscanf(experiment_string.c_str(), "Enabled-%f", &backoff_factor);
if (parsed_values == 1) {
- if (backoff_factor < 1.0f) {
+ if (backoff_factor >= 1.0f) {
LOG(WARNING) << "Back-off factor must be less than 1.";
- } else if (backoff_factor > 0.0f) {
+ } else if (backoff_factor <= 0.0f) {
LOG(WARNING) << "Back-off factor must be greater than 0.";
} else {
return backoff_factor;