Fix valgrind issue introduced in r2983
Review URL: https://webrtc-codereview.appspot.com/936004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2986 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
87736720eb
commit
1997ddb713
@ -33,10 +33,10 @@ VideoProcessingModuleTest::VideoProcessingModuleTest() :
|
|||||||
_vpm(NULL),
|
_vpm(NULL),
|
||||||
_sourceFile(NULL),
|
_sourceFile(NULL),
|
||||||
_width(352),
|
_width(352),
|
||||||
_half_width(_width / 2),
|
_half_width((_width + 1) / 2),
|
||||||
_height(288),
|
_height(288),
|
||||||
_size_y(_width * _height),
|
_size_y(_width * _height),
|
||||||
_size_uv(_half_width * _height /2),
|
_size_uv(_half_width * ((_height + 1) / 2)),
|
||||||
_frame_length(CalcBufferSize(kI420, _width, _height))
|
_frame_length(CalcBufferSize(kI420, _width, _height))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -72,6 +72,9 @@ void VideoProcessingModuleTest::TearDown()
|
|||||||
TEST_F(VideoProcessingModuleTest, HandleNullBuffer)
|
TEST_F(VideoProcessingModuleTest, HandleNullBuffer)
|
||||||
{
|
{
|
||||||
VideoProcessingModule::FrameStats stats;
|
VideoProcessingModule::FrameStats stats;
|
||||||
|
memset(_videoFrame.buffer(kYPlane), 0, _size_y);
|
||||||
|
memset(_videoFrame.buffer(kUPlane), 0, _size_uv);
|
||||||
|
memset(_videoFrame.buffer(kVPlane), 0, _size_uv);
|
||||||
ASSERT_EQ(0, _vpm->GetFrameStats(&stats, _videoFrame));
|
ASSERT_EQ(0, _vpm->GetFrameStats(&stats, _videoFrame));
|
||||||
// Video frame with unallocated buffer.
|
// Video frame with unallocated buffer.
|
||||||
I420VideoFrame videoFrame;
|
I420VideoFrame videoFrame;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user