Add ability to cap the video jitter estimate to a max value.
Bug: webrtc:10572
Change-Id: I21112824dc02afa71db61bb8c2f02723e8b325b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133963
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27744}
diff --git a/modules/video_coding/jitter_buffer.cc b/modules/video_coding/jitter_buffer.cc
index 3d3b967..7a7f632 100644
--- a/modules/video_coding/jitter_buffer.cc
+++ b/modules/video_coding/jitter_buffer.cc
@@ -582,7 +582,8 @@
uint32_t VCMJitterBuffer::EstimatedJitterMs() {
rtc::CritScope cs(&crit_sect_);
const double rtt_mult = 1.0f;
- return jitter_estimate_.GetJitterEstimate(rtt_mult);
+ const double jitter_est_cap_ms = 300.0f;
+ return jitter_estimate_.GetJitterEstimate(rtt_mult, jitter_est_cap_ms);
}
void VCMJitterBuffer::SetNackSettings(size_t max_nack_list_size,