Index: webrtc/modules/remote_bitrate_estimator/overuse_detector.cc |
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc |
index 042fe9aa2ae05625ce88861225637fc1bd1278aa..2f1ce36c303e9aacda0535a873a2376d3e58b6d2 100644 |
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc |
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc |
@@ -142,8 +142,10 @@ void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) { |
} |
const double k = fabs(modified_offset) < threshold_ ? k_down_ : k_up_; |
+ const int64_t kMaxTimeDeltaMs = 100; |
stefan-webrtc
2016/03/10 11:34:41
This was caught by the existing tests:
TestShortTi
mflodman
2016/03/10 11:59:33
Good catch!
mflodman
2016/03/10 11:59:33
After discussions, I agree that 100 is a good thre
|
+ int64_t time_delta_ms = std::min(now_ms - last_update_ms_, kMaxTimeDeltaMs); |
threshold_ += |
- k * (fabs(modified_offset) - threshold_) * (now_ms - last_update_ms_); |
+ k * (fabs(modified_offset) - threshold_) * time_delta_ms; |
const double kMinThreshold = 6; |
const double kMaxThreshold = 600; |