Fixes a coverity warning in the mixer module.
Review URL: https://webrtc-codereview.appspot.com/388009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1688 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
132261446b
commit
b38a66aaac
@ -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
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -803,15 +803,23 @@ void AudioConferenceMixerImpl::UpdateToMix(
|
||||
bool replaceWasMixed = false;
|
||||
MapItem* replaceParticipant = mixParticipantList.Find(
|
||||
replaceFrame->_id);
|
||||
// When a frame is pushed to |activeList| it is also pushed
|
||||
// to mixParticipantList with the frame's id. This means
|
||||
// that the Find call above should never fail.
|
||||
if(replaceParticipant == NULL)
|
||||
{
|
||||
assert(false);
|
||||
} else {
|
||||
static_cast<MixerParticipant*>(
|
||||
replaceParticipant->GetItem())->_mixHistory->WasMixed(
|
||||
replaceWasMixed);
|
||||
replaceParticipant->GetItem())->_mixHistory->
|
||||
WasMixed(replaceWasMixed);
|
||||
|
||||
mixParticipantList.Erase(replaceFrame->_id);
|
||||
activeList.Erase(replaceItem);
|
||||
|
||||
activeList.PushFront(static_cast<void*>(audioFrame));
|
||||
mixParticipantList.Insert(audioFrame->_id,
|
||||
mixParticipantList.Insert(
|
||||
audioFrame->_id,
|
||||
static_cast<void*>(participant));
|
||||
assert(mixParticipantList.Size() <=
|
||||
kMaximumAmountOfMixedParticipants);
|
||||
@ -819,12 +827,14 @@ void AudioConferenceMixerImpl::UpdateToMix(
|
||||
if(replaceWasMixed)
|
||||
{
|
||||
RampOut(*replaceFrame);
|
||||
rampOutList.PushBack(static_cast<void*>(replaceFrame));
|
||||
rampOutList.PushBack(
|
||||
static_cast<void*>(replaceFrame));
|
||||
assert(rampOutList.GetSize() <=
|
||||
kMaximumAmountOfMixedParticipants);
|
||||
} else {
|
||||
_audioFramePool->PushMemory(replaceFrame);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(wasMixed)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user