diff --git a/webrtc/modules/audio_coding/main/test/Channel.cc b/webrtc/modules/audio_coding/main/test/Channel.cc index 8296d2a7f..d32735e3b 100644 --- a/webrtc/modules/audio_coding/main/test/Channel.cc +++ b/webrtc/modules/audio_coding/main/test/Channel.cc @@ -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)); } } diff --git a/webrtc/modules/audio_coding/main/test/Channel.h b/webrtc/modules/audio_coding/main/test/Channel.h index 27b2cfb6f..7611c9d6e 100644 --- a/webrtc/modules/audio_coding/main/test/Channel.h +++ b/webrtc/modules/audio_coding/main/test/Channel.h @@ -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;