Fixing uninitialized codec settings struct in test.

BUG=
TEST=video_codecs_test_framework_unittests passing in Debug+Release on Linux, Mac and Windows.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1632 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2012-02-08 07:09:32 +00:00
parent 648af7423f
commit 1970b2fcb3
2 changed files with 12 additions and 2 deletions

View File

@ -32,6 +32,7 @@
'type': 'executable',
'dependencies': [
'video_codecs_test_framework',
'webrtc_video_coding',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/../testing/gmock.gyp:gmock',
'<(webrtc_root)/../test/test.gyp:test_support_main',

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@ -13,6 +13,7 @@
#include "modules/video_coding/codecs/test/mock/mock_packet_manipulator.h"
#include "modules/video_coding/codecs/test/videoprocessor.h"
#include "modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
#include "modules/video_coding/main/interface/video_coding.h"
#include "testsupport/mock/mock_frame_reader.h"
#include "testsupport/mock/mock_frame_writer.h"
#include "testsupport/packet_reader.h"
@ -37,10 +38,18 @@ class VideoProcessorTest: public testing::Test {
MockPacketManipulator packet_manipulator_mock_;
Stats stats_;
TestConfig config_;
VideoCodec codec_settings_;
VideoProcessorTest() {}
virtual ~VideoProcessorTest() {}
void SetUp() {}
void SetUp() {
// Get a codec configuration struct and configure it.
VideoCodingModule::Codec(kVideoCodecVP8, &codec_settings_);
config_.codec_settings = &codec_settings_;
config_.codec_settings->startBitrate = 100;
config_.codec_settings->width = 352;
config_.codec_settings->height = 288;
}
void TearDown() {}
void ExpectInit() {