From 3e427263ee1e0856be95f538158d7cdfa8d00e7a Mon Sep 17 00:00:00 2001 From: "minyue@webrtc.org" Date: Mon, 11 Nov 2013 22:03:52 +0000 Subject: [PATCH] Reducing opus_test runtime to pass Android test BUG=2609 R=solenberg@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/3639004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5111 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/main/test/opus_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_coding/main/test/opus_test.cc b/webrtc/modules/audio_coding/main/test/opus_test.cc index 1dd42c980d..3c9adb7019 100644 --- a/webrtc/modules/audio_coding/main/test/opus_test.cc +++ b/webrtc/modules/audio_coding/main/test/opus_test.cc @@ -219,6 +219,7 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate, int written_samples = 0; int read_samples = 0; int decoded_samples = 0; + channel->reset_payload_size(); counter_ = 0; @@ -226,7 +227,8 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate, EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_mono_encoder_, bitrate)); EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_stereo_encoder_, bitrate)); - while (1) { + // Make sure the runtime is less than 60 seconds to pass Android test. + for (size_t audio_length = 0; audio_length < 10000; audio_length += 10) { bool lost_packet = false; // Get 10 msec of audio.