Index: webrtc/call/call.cc |
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc |
index e3c6ec7a0ccb5443e69dabb02dcb11f39f2460e0..0ac5a0f1e11c26f867b7127da1230733e352746d 100644 |
--- a/webrtc/call/call.cc |
+++ b/webrtc/call/call.cc |
@@ -10,6 +10,7 @@ |
#include <string.h> |
+#include <algorithm> |
#include <map> |
#include <memory> |
#include <vector> |
@@ -700,6 +701,10 @@ void Call::OnNetworkChanged(uint32_t target_bitrate_bps, uint8_t fraction_loss, |
pacer_bitrate_sum_kbits_ += pacer_bitrate_bps / 1000; |
++num_bitrate_updates_; |
} |
+ |
+ // Make sure to not ask for more padding than the current BWE allows for. |
+ pad_up_to_bitrate_bps = std::min(static_cast<uint32_t>(pad_up_to_bitrate_bps), |
+ target_bitrate_bps); |
congestion_controller_->SetAllocatedSendBitrate(allocated_bitrate_bps, |
pad_up_to_bitrate_bps); |
} |