Fix Linux-release errors and Valgrind errors.

BUG=
TEST=build on Linux release.
TBR=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/456008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1949 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2012-03-27 18:30:26 +00:00
parent 61b1b4b472
commit 952f601405
2 changed files with 13 additions and 3 deletions

View File

@@ -37,7 +37,8 @@ NETEQTEST_NetEQClass::NETEQTEST_NetEQClass(enum WebRtcNetEQDecoder *usedCodec, i
_bufferMem(NULL),
_preparseRTP(false),
_fsmult(1),
_isMaster(true)
_isMaster(true),
_noDecode(false)
{
#ifdef WINDOWS_TIMING
_totTimeRecIn.QuadPart = 0;

View File

@@ -89,9 +89,18 @@ int main(int argc, char* argv[])
// read file header
char firstline[FIRSTLINELEN];
fgets(firstline, FIRSTLINELEN, inFile);
if (fgets(firstline, FIRSTLINELEN, inFile) == NULL)
{
std::cout << "Error reading file " << input_filename << std::endl;
return -1;
}
// start_sec + start_usec + source + port + padding
fread(firstline, 4+4+4+2+2, 1, inFile);
if (fread(firstline, 4+4+4+2+2, 1, inFile) != 1)
{
std::cout << "Error reading file " << input_filename << std::endl;
return -1;
}
while (packet->readFromFile(inFile) >= 0)
{