Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(940)

Unified Diff: webrtc/modules/pacing/interval_budget.cc

Issue 2995183002: Fix for alr detection bug on pause. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/interval_budget.cc
diff --git a/webrtc/modules/pacing/interval_budget.cc b/webrtc/modules/pacing/interval_budget.cc
index 0cd6cf5bbe9a0e95279e444b90f3947c7c900adb..7e4fe0200ac576a604dd18bd1c19a5263e2a6e8e 100644
--- a/webrtc/modules/pacing/interval_budget.cc
+++ b/webrtc/modules/pacing/interval_budget.cc
@@ -15,6 +15,7 @@
namespace webrtc {
namespace {
constexpr int kWindowMs = 500;
+constexpr int kDeltaTimeMs = 2000;
}
IntervalBudget::IntervalBudget(int initial_target_rate_kbps)
@@ -34,6 +35,7 @@ void IntervalBudget::set_target_rate_kbps(int target_rate_kbps) {
}
void IntervalBudget::IncreaseBudget(int64_t delta_time_ms) {
+ RTC_DCHECK_LT(delta_time_ms, kDeltaTimeMs);
int bytes = target_rate_kbps_ * delta_time_ms / 8;
if (bytes_remaining_ < 0 || can_build_up_underuse_) {
// We overused last interval, compensate this interval.
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698