From 99fb004f0dd9e47a265494edcbf7e76efb8b03c2 Mon Sep 17 00:00:00 2001 From: Minyue Li Date: Sun, 8 Jul 2018 22:02:39 +0200 Subject: [PATCH] Remove a legacy DCHEC in FakeDecodeFromFile. Bug: None Change-Id: Ia76bf18eb228b658d0a7146cdb6e46586b3507a0 Reviewed-on: https://webrtc-review.googlesource.com/87435 Reviewed-by: Alessio Bazzica Commit-Queue: Minyue Li Cr-Commit-Position: refs/heads/master@{#23890} --- modules/audio_coding/neteq/tools/fake_decode_from_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/audio_coding/neteq/tools/fake_decode_from_file.cc b/modules/audio_coding/neteq/tools/fake_decode_from_file.cc index a38de32c1f..a51dac3fe0 100644 --- a/modules/audio_coding/neteq/tools/fake_decode_from_file.cc +++ b/modules/audio_coding/neteq/tools/fake_decode_from_file.cc @@ -31,7 +31,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded, // Decoder is asked to produce codec-internal comfort noise. RTC_DCHECK(!encoded); // NetEq always sends nullptr in this case. RTC_DCHECK(cng_mode_); - RTC_DCHECK_GT(last_decoded_length_, 0); + RTC_DCHECK_GT(total_samples_to_decode, 0); std::fill_n(decoded, total_samples_to_decode, 0); *speech_type = kComfortNoise; return rtc::dchecked_cast(total_samples_to_decode); @@ -55,7 +55,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded, ByteReader::ReadLittleEndian(&encoded[8]); if (original_payload_size_bytes == 1) { // This is a comfort noise payload. - RTC_DCHECK_GT(last_decoded_length_, 0); + RTC_DCHECK_GT(total_samples_to_decode, 0); std::fill_n(decoded, total_samples_to_decode, 0); *speech_type = kComfortNoise; cng_mode_ = true;