Fix two invalid DCHECKs related to audio BWE.

These are invalid since:
- An allocated bitrate of 0 means that the stream should be disabled. Changing the behavior to send audio at min bitrate even though the allocator asks for the stream to be disabled.
- It should be OK to set a min bitrate equal to the start bitrate.

BUG=webrtc:5079

Review-Url: https://codereview.webrtc.org/2806163003
Cr-Commit-Position: refs/heads/master@{#17613}
This commit is contained in:
stefan 2017-04-10 03:53:00 -07:00 committed by Commit bot
parent 49cad02cf3
commit fca900aa37
2 changed files with 7 additions and 1 deletions

View File

@ -246,6 +246,12 @@ uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt,
int64_t probing_interval_ms) {
// A send stream may be allocated a bitrate of zero if the allocator decides
// to disable it. For now we ignore this decision and keep sending on min
// bitrate.
if (bitrate_bps == 0) {
bitrate_bps = config_.min_bitrate_bps;
}
RTC_DCHECK_GE(bitrate_bps,
static_cast<uint32_t>(config_.min_bitrate_bps));
// The bitrate allocator might allocate an higher than max configured bitrate

View File

@ -374,7 +374,7 @@ Call::Call(const Call::Config& config,
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
RTC_DCHECK(config.event_log != nullptr);
RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
RTC_DCHECK_GT(config.bitrate_config.start_bitrate_bps,
RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
config.bitrate_config.min_bitrate_bps);
if (config.bitrate_config.max_bitrate_bps != -1) {
RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,