From 0c96449305634773ae374eae31e178a1a1fcdc7f Mon Sep 17 00:00:00 2001 From: Jakob Ivarsson Date: Wed, 11 Mar 2020 09:18:59 +0100 Subject: [PATCH] Clamp stable target bitrate to min/max allocated bitrate. Currently, the stable target can grow to 2x the max allocated bitrate. Bug: None Change-Id: I71657cb49ebebd429aae0bcd2e2978938252115c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170222 Reviewed-by: Sam Zackrisson Reviewed-by: Sebastian Jansson Commit-Queue: Jakob Ivarsson Cr-Commit-Position: refs/heads/master@{#30776} --- audio/audio_send_stream.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc index a0f959db73..2dcb37adf1 100644 --- a/audio/audio_send_stream.cc +++ b/audio/audio_send_stream.cc @@ -507,6 +507,7 @@ uint32_t AudioSendStream::OnBitrateUpdated(BitrateAllocationUpdate update) { // higher than max to allow for e.g. extra FEC. auto constraints = GetMinMaxBitrateConstraints(); update.target_bitrate.Clamp(constraints.min, constraints.max); + update.stable_target_bitrate.Clamp(constraints.min, constraints.max); channel_send_->OnBitrateAllocation(update);