| Index: webrtc/call/call.cc
|
| diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
|
| index a69be98bbb85dc1b79e4d3e12e8af9ddc99bbe88..9a036c9ede2bd8ae32c2de92151a9603401aaeec 100644
|
| --- a/webrtc/call/call.cc
|
| +++ b/webrtc/call/call.cc
|
| @@ -123,8 +123,7 @@
|
|
|
| VideoSendStream::RtpStateMap suspended_video_send_ssrcs_;
|
|
|
| - RtcEventLog* event_log_ = nullptr;
|
| - VoECodec* voe_codec_ = nullptr;
|
| + RtcEventLog* event_log_;
|
|
|
| RTC_DISALLOW_COPY_AND_ASSIGN(Call);
|
| };
|
| @@ -143,7 +142,8 @@
|
| config_(config),
|
| network_enabled_(true),
|
| receive_crit_(RWLockWrapper::CreateRWLock()),
|
| - send_crit_(RWLockWrapper::CreateRWLock()) {
|
| + send_crit_(RWLockWrapper::CreateRWLock()),
|
| + event_log_(nullptr) {
|
| RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
|
| RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
|
| RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
|
| @@ -153,11 +153,11 @@
|
| config.bitrate_config.start_bitrate_bps);
|
| }
|
| if (config.voice_engine) {
|
| - // Keep a reference to VoECodec, so we're sure the VoiceEngine lives for the
|
| - // duration of the call.
|
| - voe_codec_ = VoECodec::GetInterface(config.voice_engine);
|
| - if (voe_codec_)
|
| - event_log_ = voe_codec_->GetEventLog();
|
| + VoECodec* voe_codec = VoECodec::GetInterface(config.voice_engine);
|
| + if (voe_codec) {
|
| + event_log_ = voe_codec->GetEventLog();
|
| + voe_codec->Release();
|
| + }
|
| }
|
|
|
| Trace::CreateTrace();
|
| @@ -179,9 +179,6 @@
|
|
|
| module_process_thread_->Stop();
|
| Trace::ReturnTrace();
|
| -
|
| - if (voe_codec_)
|
| - voe_codec_->Release();
|
| }
|
|
|
| PacketReceiver* Call::Receiver() {
|
| @@ -232,8 +229,7 @@
|
| TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
|
| RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
|
| AudioReceiveStream* receive_stream = new AudioReceiveStream(
|
| - channel_group_->GetRemoteBitrateEstimator(false), config,
|
| - config_.voice_engine);
|
| + channel_group_->GetRemoteBitrateEstimator(false), config);
|
| {
|
| WriteLockScoped write_lock(*receive_crit_);
|
| RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
|
|
|