Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2495833002: Allowing resetting of AudioNetworkAdaptor in AudioSendStream. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index fef5b1d8efb8d85dfbc43f93688ee3c8090faed5..70bb6a90721bef649594cb77c67c231f025a5643 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -292,6 +292,12 @@ bool AudioSendStream::SetupSendCodec() {
codec->SetVADStatus(channel, false);
codec->SetFECStatus(channel, false);
+ // We disable audio network adaptor here. This will on one hand make sure that
+ // audio network adaptor is disabled by default, and on the other allow audio
+ // network adaptor to be reconfigured, since SetReceiverFrameLengthRange can
+ // be only called when audio network adaptor is disabled.
+ channel_proxy_->DisableAudioNetworkAdaptor();
+
const auto& send_codec_spec = config_.send_codec_spec;
// We set the codec first, since the below extra configuration is only applied
@@ -345,8 +351,6 @@ bool AudioSendStream::SetupSendCodec() {
*config_.audio_network_adaptor_config);
LOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
<< config_.rtp.ssrc;
- } else {
- channel_proxy_->DisableAudioNetworkAdaptor();
}
}
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698