diff options
author | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 19:05:50 +0000 |
---|---|---|
committer | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 19:05:50 +0000 |
commit | d9514c1521f6a4b1bdba2eddfb8083a0a1d22be4 (patch) | |
tree | 2c6c20eb0e97254029ec3af8ef97733f2cbc6cef | |
parent | 26a0750bd706c9c47c9fbee4ae848eb3dd6daae3 (diff) | |
download | chromium_src-d9514c1521f6a4b1bdba2eddfb8083a0a1d22be4.zip chromium_src-d9514c1521f6a4b1bdba2eddfb8083a0a1d22be4.tar.gz chromium_src-d9514c1521f6a4b1bdba2eddfb8083a0a1d22be4.tar.bz2 |
Fix valgrind messages for uninitialized preload_ value.
The preload_ field was uninitialized when PipelineImpl was constructed, so
PipelineImpl unit tests failed Valgrind tests. CL 80465 introduced the problem.
BUG=NONE
TEST=NONE
TBR=acolwell
Review URL: http://codereview.chromium.org/6720052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80503 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | media/base/pipeline_impl.cc | 1 | ||||
-rw-r--r-- | media/base/pipeline_impl_unittest.cc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index 2555bd7..f574b85 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc @@ -367,6 +367,7 @@ void PipelineImpl::ResetState() { video_width_ = 0; video_height_ = 0; volume_ = 1.0f; + preload_ = AUTO; playback_rate_ = 0.0f; status_ = PIPELINE_OK; has_audio_ = false; diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc index 87f3e96..2028e7a 100644 --- a/media/base/pipeline_impl_unittest.cc +++ b/media/base/pipeline_impl_unittest.cc @@ -100,6 +100,7 @@ class PipelineImplTest : public ::testing::Test { mocks_->demuxer()->SetTotalAndBufferedBytesAndDuration( kTotalBytes, kBufferedBytes, duration); EXPECT_CALL(*mocks_->demuxer(), SetPlaybackRate(0.0f)); + EXPECT_CALL(*mocks_->demuxer(), SetPreload(AUTO)); EXPECT_CALL(*mocks_->demuxer(), Seek(base::TimeDelta(), NotNull())) .WillOnce(Invoke(&RunFilterCallback)); EXPECT_CALL(*mocks_->demuxer(), Stop(NotNull())) @@ -850,4 +851,3 @@ TEST(PipelineStatusNotificationTest, DelayedCallback) { } } // namespace media - |