From 95c2364d2f0e2139ce6e28086920d34880fa279c Mon Sep 17 00:00:00 2001 From: "tina.legrand@webrtc.org" Date: Fri, 28 Sep 2012 10:49:59 +0000 Subject: [PATCH] Memory error in cng_unittest Review URL: https://webrtc-codereview.appspot.com/845008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2839 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_coding/codecs/cng/cng_unittest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/audio_coding/codecs/cng/cng_unittest.cc b/src/modules/audio_coding/codecs/cng/cng_unittest.cc index 71817e48d..5d43b7ded 100644 --- a/src/modules/audio_coding/codecs/cng/cng_unittest.cc +++ b/src/modules/audio_coding/codecs/cng/cng_unittest.cc @@ -54,8 +54,8 @@ void CngTest::SetUp() { webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); input_file = fopen(file_name.c_str(), "rb"); ASSERT_TRUE(input_file != NULL); - ASSERT_EQ(480, static_cast(fread(speech_data_, sizeof(int16_t), - 480, input_file))); + ASSERT_EQ(640, static_cast(fread(speech_data_, sizeof(int16_t), + 640, input_file))); fclose(input_file); input_file = NULL; } @@ -315,6 +315,7 @@ TEST_F(CngTest, CngAutoSid) { // Free encoder and decoder memory. EXPECT_EQ(0, WebRtcCng_FreeEnc(cng_enc_inst_)); + EXPECT_EQ(0, WebRtcCng_FreeDec(cng_dec_inst_)); } // Test automatic SID, with very short interval. @@ -341,6 +342,7 @@ TEST_F(CngTest, CngAutoSidShort) { // Free encoder and decoder memory. EXPECT_EQ(0, WebRtcCng_FreeEnc(cng_enc_inst_)); + EXPECT_EQ(0, WebRtcCng_FreeDec(cng_dec_inst_)); } } // namespace webrtc