Add 1minute as max hold duration to make sure that loss based BWE always tries to increase estimate.
Bug: webrtc:12707
Change-Id: I94689431726a37e2bfec52992046305705c6bb8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324741
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41025}
diff --git a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
index 1a90aa0..e26fcc6 100644
--- a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
+++ b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
@@ -36,6 +36,7 @@
namespace {
constexpr TimeDelta kInitHoldDuration = TimeDelta::Millis(300);
+constexpr TimeDelta kMaxHoldDuration = TimeDelta::Seconds(60);
bool IsValid(DataRate datarate) {
return datarate.IsFinite();
@@ -361,7 +362,8 @@
<< ", duration: " << hold_duration_.seconds();
last_hold_timestamp_ =
last_send_time_most_recent_observation_ + hold_duration_;
- hold_duration_ = hold_duration_ * config_->hold_duration_factor;
+ hold_duration_ = std::min(kMaxHoldDuration,
+ hold_duration_ * config_->hold_duration_factor);
}
last_padding_info_ = PaddingInfo();
loss_based_result_.state = LossBasedState::kDecreasing;