Resolves memcheck issue in AudioCodingModuleTest. The issue is coditional jumnp based on uninitialized variable.
BUG=2944 R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8919004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5579 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
97e7a640d8
commit
c2d69d3229
@ -120,6 +120,7 @@ int32_t Channel::SendData(const FrameType frameType, const uint8_t payloadType,
|
||||
return status;
|
||||
}
|
||||
|
||||
// TODO(turajs): rewite this method.
|
||||
void Channel::CalcStatistics(WebRtcRTPHeader& rtpInfo, uint16_t payloadSize) {
|
||||
int n;
|
||||
if ((rtpInfo.header.payloadType != _lastPayloadType)
|
||||
@ -188,6 +189,8 @@ void Channel::CalcStatistics(WebRtcRTPHeader& rtpInfo, uint16_t payloadSize) {
|
||||
currentPayloadStr->lastPayloadLenByte = payloadSize;
|
||||
currentPayloadStr->lastTimestamp = rtpInfo.header.timestamp;
|
||||
currentPayloadStr->payloadType = rtpInfo.header.payloadType;
|
||||
memset(currentPayloadStr->frameSizeStats, 0,
|
||||
sizeof(ACMTestPayloadStats::frameSizeStats));
|
||||
}
|
||||
} else {
|
||||
n = 0;
|
||||
@ -199,6 +202,8 @@ void Channel::CalcStatistics(WebRtcRTPHeader& rtpInfo, uint16_t payloadSize) {
|
||||
_payloadStats[n].lastPayloadLenByte = payloadSize;
|
||||
_payloadStats[n].lastTimestamp = rtpInfo.header.timestamp;
|
||||
_payloadStats[n].payloadType = rtpInfo.header.payloadType;
|
||||
memset(_payloadStats[n].frameSizeStats, 0,
|
||||
sizeof(ACMTestPayloadStats::frameSizeStats));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ class CriticalSectionWrapper;
|
||||
#define MAX_NUM_PAYLOADS 50
|
||||
#define MAX_NUM_FRAMESIZES 6
|
||||
|
||||
// TODO(turajs): Write constructor for this structure.
|
||||
struct ACMTestFrameSizeStats {
|
||||
uint16_t frameSizeSample;
|
||||
int16_t maxPayloadLen;
|
||||
@ -34,6 +35,7 @@ struct ACMTestFrameSizeStats {
|
||||
double usageLenSec;
|
||||
};
|
||||
|
||||
// TODO(turajs): Write constructor for this structure.
|
||||
struct ACMTestPayloadStats {
|
||||
bool newPacket;
|
||||
int16_t payloadType;
|
||||
|
Loading…
x
Reference in New Issue
Block a user