Chromium Code Reviews| Index: webrtc/pc/channelmanager.cc |
| diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc |
| index af6e3c7e99e16f9780c4872ee8384a2d006e71df..d9dd35a2aa12b9668623c6a6d6b13978a6ded2c3 100644 |
| --- a/webrtc/pc/channelmanager.cc |
| +++ b/webrtc/pc/channelmanager.cc |
| @@ -140,14 +140,19 @@ bool ChannelManager::Init() { |
| rtc::Bind(&rtc::Thread::SetAllowBlockingCalls, network_thread_, false)); |
| } |
| +#if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) |
|
Taylor Brandstetter
2017/05/11 04:43:11
Should be an ||?
Zhi Huang
2017/05/12 20:05:33
Done.
|
| initialized_ = worker_thread_->Invoke<bool>( |
| RTC_FROM_HERE, Bind(&ChannelManager::InitMediaEngine_w, this)); |
| +#else |
| + initialized_ = true; |
| +#endif |
| RTC_DCHECK(initialized_); |
| return initialized_; |
| } |
| bool ChannelManager::InitMediaEngine_w() { |
| RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
| + RTC_DCHECK(media_engine_); |
| return media_engine_->Init(); |
| } |
| @@ -224,6 +229,9 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w( |
| RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
| RTC_DCHECK(nullptr != call); |
| +#ifndef HAVE_WEBRTC_VOICE |
| + return nullptr; |
|
Taylor Brandstetter
2017/05/11 04:43:11
I'm curious, why was this necessary?
Zhi Huang
2017/05/12 20:05:33
Because the media_engine_ here would be a nullptr.
|
| +#endif |
| VoiceMediaChannel* media_channel = media_engine_->CreateChannel( |
| call, media_config, options); |
| if (!media_channel) |