From 8e6a76194d518c6ed446443797b909d789deb58b Mon Sep 17 00:00:00 2001 From: isheriff Date: Thu, 29 Sep 2016 05:36:59 -0700 Subject: [PATCH] ProbeController: Limit max probing bitrate BUG=webrtc:6332 Review-Url: https://codereview.webrtc.org/2352093002 Cr-Commit-Position: refs/heads/master@{#14436} --- webrtc/modules/congestion_controller/probe_controller.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webrtc/modules/congestion_controller/probe_controller.cc b/webrtc/modules/congestion_controller/probe_controller.cc index e91e06efd5..2e253f1a13 100644 --- a/webrtc/modules/congestion_controller/probe_controller.cc +++ b/webrtc/modules/congestion_controller/probe_controller.cc @@ -10,6 +10,7 @@ #include "webrtc/modules/congestion_controller/probe_controller.h" +#include #include #include "webrtc/base/logging.h" @@ -31,6 +32,9 @@ constexpr int64_t kMaxWaitingTimeForProbingResultMs = 1000; // further probing is disabled. constexpr int kExponentialProbingDisabled = 0; +// A limit to prevent probing at excessive bitrates. +constexpr int kMaxProbingBitrateBps = 10000000; + } // namespace ProbeController::ProbeController(PacedSender* pacer, Clock* clock) @@ -97,6 +101,7 @@ void ProbeController::InitiateProbing( int min_bitrate_to_probe_further_bps) { bool first_cluster = true; for (int bitrate : bitrates_to_probe) { + bitrate = std::min(bitrate, kMaxProbingBitrateBps); if (first_cluster) { pacer_->CreateProbeCluster(bitrate, kProbeDeltasPerCluster + 1); first_cluster = false;