Index: webrtc/modules/audio_coding/test/TestStereo.cc |
diff --git a/webrtc/modules/audio_coding/test/TestStereo.cc b/webrtc/modules/audio_coding/test/TestStereo.cc |
index 19f027b0582ec7dd86e08f0228cadd8827d75d4c..5fc4f5cde8975baa26a6bb678b8ff7d995e2e1b9 100644 |
--- a/webrtc/modules/audio_coding/test/TestStereo.cc |
+++ b/webrtc/modules/audio_coding/test/TestStereo.cc |
@@ -15,6 +15,7 @@ |
#include <string> |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "webrtc/base/checks.h" |
#include "webrtc/common_types.h" |
#include "webrtc/engine_configurations.h" |
#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
@@ -735,6 +736,13 @@ void TestStereo::Run(TestPackStereo* channel, int in_channels, int out_channels, |
int error_count = 0; |
int variable_bytes = 0; |
int variable_packets = 0; |
+ static const int kTestLengthMs = 500; |
+ const int test_length_blocks = rtc::CheckedDivExact(kTestLengthMs, 10); |
+ in_file_mono_->SetNum10MsBlocksToRead(test_length_blocks); |
+ in_file_stereo_->SetNum10MsBlocksToRead(test_length_blocks); |
+ // Fast-forward 1 second (100 blocks) since the files start with silence. |
+ in_file_stereo_->FastForward(100); |
+ in_file_mono_->FastForward(100); |
while (1) { |
// Simulate packet loss by setting |packet_loss_| to "true" in |
@@ -800,7 +808,7 @@ void TestStereo::Run(TestPackStereo* channel, int in_channels, int out_channels, |
// such as Opus. |
if (variable_packets > 0) { |
variable_bytes /= variable_packets; |
- EXPECT_NEAR(variable_bytes, pack_size_bytes_, 3); |
+ EXPECT_NEAR(variable_bytes, pack_size_bytes_, 18); |
} |
if (in_file_mono_->EndOfFile()) { |