| Index: webrtc/modules/audio_coding/main/test/opus_test.cc
|
| diff --git a/webrtc/modules/audio_coding/main/test/opus_test.cc b/webrtc/modules/audio_coding/main/test/opus_test.cc
|
| index a407fc5d36f0222897f7792d2f125415a480bf5d..c61d25ad19acd026b11bca7dd528f87a3a19d4be 100644
|
| --- a/webrtc/modules/audio_coding/main/test/opus_test.cc
|
| +++ b/webrtc/modules/audio_coding/main/test/opus_test.cc
|
| @@ -273,17 +273,11 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate,
|
| int16_t bitstream_len_byte;
|
| uint8_t bitstream[kMaxBytes];
|
| for (int i = 0; i < loop_encode; i++) {
|
| - if (channels == 1) {
|
| - bitstream_len_byte = WebRtcOpus_Encode(
|
| - opus_mono_encoder_, &audio[read_samples],
|
| - frame_length, kMaxBytes, bitstream);
|
| - ASSERT_GE(bitstream_len_byte, 0);
|
| - } else {
|
| - bitstream_len_byte = WebRtcOpus_Encode(
|
| - opus_stereo_encoder_, &audio[read_samples],
|
| - frame_length, kMaxBytes, bitstream);
|
| - ASSERT_GE(bitstream_len_byte, 0);
|
| - }
|
| + int bitstream_len_byte_int = WebRtcOpus_Encode(
|
| + (channels == 1) ? opus_mono_encoder_ : opus_stereo_encoder_,
|
| + &audio[read_samples], frame_length, kMaxBytes, bitstream);
|
| + ASSERT_GE(bitstream_len_byte_int, 0);
|
| + bitstream_len_byte = static_cast<int16_t>(bitstream_len_byte_int);
|
|
|
| // Simulate packet loss by setting |packet_loss_| to "true" in
|
| // |percent_loss| percent of the loops.
|
|
|