Fix release build error.

BUG=
TEST=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1083 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2011-12-02 09:18:49 +00:00
parent a4a88f90c4
commit 772d70bcd2

View File

@ -134,7 +134,9 @@ void VP8RpsTest::Perform() {
bool VP8RpsTest::Encode(RpsDecodeCompleteCallback* decodeCallback) {
_lengthEncFrame = 0;
fread(_sourceBuffer, 1, _lengthSourceFrame, _sourceFile);
size_t bytes_read = fread(_sourceBuffer, 1, _lengthSourceFrame, _sourceFile);
if (bytes_read < 0)
return true;
_inputVideoBuffer.CopyBuffer(_lengthSourceFrame, _sourceBuffer);
_inputVideoBuffer.SetTimeStamp((unsigned int)
(_encFrameCnt * 9e4 / _inst.maxFramerate));
@ -161,6 +163,9 @@ bool VP8RpsTest::Encode(RpsDecodeCompleteCallback* decodeCallback) {
}
printf("Encoding: %u\n", _framecnt);
int ret = _encoder->Encode(rawImage, codecSpecificInfo, &frameType);
if (ret < 0)
printf("Failed to encode: %u\n", _framecnt);
if (codecSpecificInfo != NULL) {
delete codecSpecificInfo;
codecSpecificInfo = NULL;
@ -172,7 +177,6 @@ bool VP8RpsTest::Encode(RpsDecodeCompleteCallback* decodeCallback) {
else {
_totalEncodeTime += tGetTime() - _encodeTimes[rawImage._timeStamp];
}
assert(ret >= 0);
return false;
}