Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1560)

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc

Issue 1334303005: Returning correct duration estimate on Opus DTX packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fixing a silly mistake in unittest Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
index d2fd009055ed5f9475d689dc3c96f7f22c8235a9..db622a7c7f878381468b48293305f515f88cc597 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -105,9 +105,12 @@ int OpusTest::EncodeDecode(WebRtcOpusEncInst* encoder,
kMaxBytes, bitstream_);
EXPECT_GE(encoded_bytes_int, 0);
encoded_bytes_ = static_cast<size_t>(encoded_bytes_int);
- return WebRtcOpus_Decode(decoder, bitstream_,
- encoded_bytes_, output_audio,
- audio_type);
+ int est_len = WebRtcOpus_DurationEst(decoder, bitstream_, encoded_bytes_);
+ int act_len = WebRtcOpus_Decode(decoder, bitstream_,
+ encoded_bytes_, output_audio,
+ audio_type);
+ EXPECT_EQ(est_len, act_len);
+ return act_len;
}
// Test if encoder/decoder can enter DTX mode properly and do not enter DTX when
« no previous file with comments | « webrtc/modules/audio_coding/codecs/opus/opus_interface.c ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698