Don't (re-)configure BitrateObserver unless already sending

Bug: b/70793338
Change-Id: I262474386ef424818ad63d9ad9a0fe91266686c7
Reviewed-on: https://webrtc-review.googlesource.com/35340
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21390}
This commit is contained in:
Oskar Sundbom 2017-12-20 16:38:09 +01:00 committed by Commit Bot
parent 0efd1e8b7e
commit f85e31b33c
2 changed files with 3 additions and 3 deletions

View file

@ -225,7 +225,9 @@ void AudioSendStream::ConfigureStream(
RTC_LOG(LS_ERROR) << "Failed to set up send codec state.";
}
ReconfigureBitrateObserver(stream, new_config);
if (stream->sending_) {
ReconfigureBitrateObserver(stream, new_config);
}
stream->config_ = new_config;
}

View file

@ -222,8 +222,6 @@ struct ConfigHelper {
&fake_transport_, Eq(nullptr)))
.Times(1);
}
EXPECT_CALL(*channel_proxy_, SetBitrate(_, _))
.Times(1);
EXPECT_CALL(*channel_proxy_, ResetSenderCongestionControlObjects())
.Times(1);
EXPECT_CALL(*channel_proxy_, RegisterTransport(nullptr)).Times(2);