Fix compile warnings in Release configuration.

Review URL: http://webrtc-codereview.appspot.com/119003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@424 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2011-08-23 17:53:54 +00:00
parent 06ad81fd58
commit ceb148ce59
5 changed files with 28 additions and 30 deletions

View File

@ -327,15 +327,14 @@ AudioCodingModuleImpl::Process()
{
WebRtc_UWord8 bitStream[2 * MAX_PAYLOAD_SIZE_BYTE]; // Make room for 1 RED payload
WebRtc_Word16 lengthBytes = 2 * MAX_PAYLOAD_SIZE_BYTE;
WebRtc_Word16 redLengthBytes = lengthBytes;
WebRtc_UWord32 rtpTimestamp;
WebRtc_Word16 status;
WebRtcACMEncodingType encodingType;
FrameType frameType = kAudioFrameSpeech;
WebRtc_Word16 redLengthBytes;
WebRtc_UWord8 currentPayloadType;
bool hasDataToSend = false;
bool fecActive = false;
WebRtc_UWord32 dummyFragLength;
// keep the scope of the ACM critical section limited
{
@ -415,7 +414,6 @@ AudioCodingModuleImpl::Process()
// one RTP packet and the fragmentation points
// are set.
// Only apply RED on speech data.
if((_fecEnabled) &&
((encodingType == kActiveNormalEncoded) ||
(encodingType == kPassiveNormalEncoded)))
@ -486,7 +484,7 @@ AudioCodingModuleImpl::Process()
_fragmentation->fragmentationPlType[0] = currentPayloadType;
_lastFECTimestamp = rtpTimestamp;
// can be modified by the getRedPayload() call if iSAC is utilized
// can be modified by the GetRedPayload() call if iSAC is utilized
redLengthBytes = lengthBytes;
// A fragmentation header is provided => packetization according to RFC 2198
// (RTP Payload for Redundant Audio Data) will be used.
@ -508,9 +506,6 @@ AudioCodingModuleImpl::Process()
memcpy(_redBuffer, bitStream, redLengthBytes);
}
// Temporary storing RED length
dummyFragLength = redLengthBytes;
_isFirstRED = false;
// Update payload type with RED payload type
currentPayloadType = _redPayloadType;
@ -548,7 +543,7 @@ AudioCodingModuleImpl::Process()
}
}
if (fecActive) {
_fragmentation->fragmentationLength[1] = dummyFragLength;
_fragmentation->fragmentationLength[1] = redLengthBytes;
}
return lengthBytes;
}

View File

@ -133,7 +133,7 @@ int ViEFileRecorder::StartRecording(const char* fileNameUTF8,
int ViEFileRecorder::StopRecording()
{
int error;
int error = 0;
// Stop recording audio
// Note - we can not hold the _ptrCritSect while accessing VE functions. It might cause deadlock in Write
if (_veFileInterface)

View File

@ -304,8 +304,7 @@ int ViESender::SendPacket(int vieId, const void *data, int len)
return -1;
}
int channelId = ChannelId(vieId);
assert(channelId == _channelId);
assert(ChannelId(vieId) == _channelId);
// Prepare for possible encryption and sending
WebRtc_UWord8* sendPacket = (WebRtc_UWord8*) data;
@ -356,8 +355,8 @@ int ViESender::SendRTCPPacket(int vieId, const void *data, int len)
// No transport
return -1;
}
int channelId = ChannelId(vieId);
assert(channelId == _channelId);
assert(ChannelId(vieId) == _channelId);
// Prepare for possible encryption and sending
WebRtc_UWord8* sendPacket = (WebRtc_UWord8*) data;

View File

@ -90,7 +90,13 @@ bool ViEAutoTestMain::BeginOSIndependentTesting()
}
else
{
scanf("%d", &testType);
if (scanf("%d", &testType) <= 0)
{
ViETest::Log("ERROR: unable to read selection. Try again\n");
testType = -1;
getchar();
continue;
}
getchar();
}
ViETest::Log("");

View File

@ -639,8 +639,7 @@ Channel::OnInitializeDecoder(
"payloadName=%s, frequency=%u, channels=%u, rate=%u)",
id, payloadType, payloadName, frequency, channels, rate);
WebRtc_Word32 channel = VoEChannelId(id);
assert(channel == _channelId);
assert(VoEChannelId(id) == _channelId);
CodecInst receiveCodec;
CodecInst dummyCodec;
@ -703,8 +702,7 @@ Channel::OnReceivedPacket(const WebRtc_Word32 id,
"Channel::OnReceivedPacket(id=%d, packetType=%d)",
id, packetType);
WebRtc_Word32 channel = VoEChannelId(id);
assert(channel == _channelId);
assert(VoEChannelId(id) == _channelId);
// Notify only for the case when we have restarted an RTP session.
if (_rtpPacketTimedOut && (kPacketRtp == packetType))