Restarting channel when swapping AudioReceiveStreams in WebrtcVoE.
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2383143002
Cr-Commit-Position: refs/heads/master@{#14493}
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index 358c142..71803cb 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1424,6 +1424,7 @@
LOG(LS_INFO) << "Stopping playout for channel #" << channel();
stream_->Stop();
}
+ playout_ = playout;
}
private:
@@ -1444,6 +1445,7 @@
RTC_DCHECK(!stream_);
stream_ = call_->CreateAudioReceiveStream(config_);
RTC_CHECK(stream_);
+ SetPlayout(playout_);
}
rtc::ThreadChecker worker_thread_checker_;
@@ -1452,6 +1454,7 @@
// The stream is owned by WebRtcAudioReceiveStream and may be reallocated if
// configuration changes.
webrtc::AudioReceiveStream* stream_ = nullptr;
+ bool playout_ = false;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioReceiveStream);
};