diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 21:28:12 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 21:28:12 +0000 |
commit | f0a5d7cd1a65d7ff71299f95ee78929729694f25 (patch) | |
tree | 094c2ca789185eeefdb13a691cf5b52d4329b0d0 /media | |
parent | 49930c3ae4d0bb40b94cfde0425e8c825a526144 (diff) | |
download | chromium_src-f0a5d7cd1a65d7ff71299f95ee78929729694f25.zip chromium_src-f0a5d7cd1a65d7ff71299f95ee78929729694f25.tar.gz chromium_src-f0a5d7cd1a65d7ff71299f95ee78929729694f25.tar.bz2 |
Fix a leak in AudioRendererBaseTest::OneCompleteReadCycle
We should a local reference of the input buffer, so that buffer
gets cleanup after it is out of scope.
Also disabled AudioUtilTest.FoldChannels_s16_benchmark because
it is running too long. It shold be run locally instead of on
the build bots.
TEST=media_unittests --gtest_filter=AudioRendererBaseTest.OneCompleteReadCycle
TBR=scherkus
Review URL: http://codereview.chromium.org/165087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/audio_util_unittest.cc | 3 | ||||
-rw-r--r-- | media/filters/audio_renderer_base_unittest.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/media/audio/audio_util_unittest.cc b/media/audio/audio_util_unittest.cc index aa5df4c..4554f6e 100644 --- a/media/audio/audio_util_unittest.cc +++ b/media/audio/audio_util_unittest.cc @@ -119,7 +119,7 @@ TEST(AudioUtilTest, FoldChannels_s32) { // This mimics 1 second of audio at 48000 samples per second. // Running the unittest will produce timing. -TEST(AudioUtilTest, FoldChannels_s16_benchmark) { +TEST(AudioUtilTest, DISABLED_FoldChannels_s16_benchmark) { const int kBufferSize = 1024 * 6; // Test AdjustVolume() on 16 bit samples. for (int i = 0; i < 48000; ++i) { @@ -134,4 +134,5 @@ TEST(AudioUtilTest, FoldChannels_s16_benchmark) { EXPECT_EQ(true, result_s16); } } + } // namespace media diff --git a/media/filters/audio_renderer_base_unittest.cc b/media/filters/audio_renderer_base_unittest.cc index e201498..cf2856b 100644 --- a/media/filters/audio_renderer_base_unittest.cc +++ b/media/filters/audio_renderer_base_unittest.cc @@ -204,7 +204,8 @@ TEST_F(AudioRendererBaseTest, OneCompleteReadCycle) { EXPECT_EQ(kMaxQueueSize, read_queue_.size()); // Fulfill the read with an end-of-stream packet. - read_queue_.front()->Run(new DataBuffer(0)); + scoped_refptr<DataBuffer> last_buffer = new DataBuffer(0); + read_queue_.front()->Run(last_buffer); delete read_queue_.front(); read_queue_.pop_front(); |