Chromium Code Reviews| Index: webrtc/pc/channelmanager.cc |
| diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc |
| index 995a07bf0562c6de6e43f000104be5934b4a5f60..3b7fff05c954a1b5acc9201bdd94b1fb7f69e0d4 100644 |
| --- a/webrtc/pc/channelmanager.cc |
| +++ b/webrtc/pc/channelmanager.cc |
| @@ -149,7 +149,12 @@ bool ChannelManager::Init() { |
| bool ChannelManager::InitMediaEngine_w() { |
| RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
| +#ifdef HAVE_MEDIA |
| + RTC_DCHECK(media_engine_); |
| return media_engine_->Init(); |
| +#else |
| + return true; |
| +#endif |
|
pthatcher1
2017/05/03 18:05:53
Would it be easier to just not call InitMediaEngin
Zhi Huang
2017/05/04 01:08:03
I guess we still need to do something like this:
|
| } |
| void ChannelManager::Terminate() { |
| @@ -222,6 +227,9 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w( |
| RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
| RTC_DCHECK(nullptr != media_controller); |
| +#ifndef HAVE_MEDIA |
| + return nullptr; |
| +#endif |
| VoiceMediaChannel* media_channel = media_engine_->CreateChannel( |
| media_controller->call_w(), media_controller->config(), options); |
| if (!media_channel) |