Adding ViE NULL checks.
BUG=C-10188, C-10246, C-10595 Review URL: https://webrtc-codereview.appspot.com/373013 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1559 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
cbe1de9aa6
commit
194a93ac66
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* Use of this source code is governed by a BSD-style license
|
||||||
* that can be found in the LICENSE file in the root of the source
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@ -350,7 +350,16 @@ bool TbExternalTransport::ViEExternalTransportProcess()
|
|||||||
// Take first packet in queue
|
// Take first packet in queue
|
||||||
_crit.Enter();
|
_crit.Enter();
|
||||||
packet = _rtcpPackets.front();
|
packet = _rtcpPackets.front();
|
||||||
WebRtc_Word64 timeToReceive = packet->receiveTime - NowMs();
|
WebRtc_Word64 timeToReceive = 0;
|
||||||
|
if (packet)
|
||||||
|
{
|
||||||
|
timeToReceive = packet->receiveTime - NowMs();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// There should never be any empty packets in the list.
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
if (timeToReceive > 0)
|
if (timeToReceive > 0)
|
||||||
{
|
{
|
||||||
// No packets to receive yet
|
// No packets to receive yet
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* Use of this source code is governed by a BSD-style license
|
||||||
* that can be found in the LICENSE file in the root of the source
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@ -376,8 +376,11 @@ int ViEFileImpl::StartRecordOutgoingVideo(const int video_channel,
|
|||||||
VoiceEngine* ve_ptr = NULL;
|
VoiceEngine* ve_ptr = NULL;
|
||||||
if (audio_source != NO_AUDIO) {
|
if (audio_source != NO_AUDIO) {
|
||||||
ViEChannel* vie_channel = cs.Channel(video_channel);
|
ViEChannel* vie_channel = cs.Channel(video_channel);
|
||||||
// Channel should exists since we have a ViEEncoder.
|
if (!vie_channel) {
|
||||||
assert(vie_channel);
|
// Channel should exists since we have a ViEEncoder above.
|
||||||
|
assert(false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
ve_channel_id = vie_channel->VoiceChannel();
|
ve_channel_id = vie_channel->VoiceChannel();
|
||||||
ve_ptr = shared_data_->channel_manager()->GetVoiceEngine();
|
ve_ptr = shared_data_->channel_manager()->GetVoiceEngine();
|
||||||
if (!ve_ptr) {
|
if (!ve_ptr) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* Use of this source code is governed by a BSD-style license
|
||||||
* that can be found in the LICENSE file in the root of the source
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@ -393,6 +393,11 @@ int ViEFilePlayer::SendAudioOnChannel(const int audio_channel,
|
|||||||
|
|
||||||
int ViEFilePlayer::StopSendAudioOnChannel(const int audio_channel) {
|
int ViEFilePlayer::StopSendAudioOnChannel(const int audio_channel) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
if (!voe_file_interface_) {
|
||||||
|
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, id_),
|
||||||
|
"ViEFilePlayer::StopSendAudioOnChannel() - no VoE interface");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
std::set<int>::iterator it = audio_channels_sending_.find(audio_channel);
|
std::set<int>::iterator it = audio_channels_sending_.find(audio_channel);
|
||||||
if (it == audio_channels_sending_.end()) {
|
if (it == audio_channels_sending_.end()) {
|
||||||
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, id_),
|
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(engine_id_, id_),
|
||||||
|
Loading…
Reference in New Issue
Block a user