Revert 3071 - i420:verify image length

This CL breaks vie_auto_test, test case
ViEVideoVerificationTest.RunsBaseStandardTestWithoutErrors.

BUG=

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

TBR=mikhal@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/933014

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3078 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2012-11-12 09:16:08 +00:00
parent cb76c3c3f7
commit af49062a35

View File

@@ -171,18 +171,10 @@ I420Decoder::Decode(const EncodedImage& inputImage,
if (inputImage._length <= 0) {
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
}
if (inputImage._completeFrame == false) {
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
}
if (!_inited) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
// Verify that the available length is sufficient:
int req_length = CalcBufferSize(kI420, _width, _height);
if (req_length > static_cast<int>(inputImage._length)) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
// Set decoded image parameters.
int half_width = (_width + 1) / 2;
int half_height = (_height + 1) / 2;