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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc

Issue 2845013003: NetEq tests: BUILD target reorg (Closed)
Patch Set: Fixing win compile errors Created 3 years, 8 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
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_processing/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc
index 2e452e1dea68d3414343f916f838f77f177834b1..1cc814fa883e8430ffa8b8354e8cdc6c0bfa27ab 100644
--- a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc
@@ -29,7 +29,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
RTC_DCHECK_GT(last_decoded_length_, 0);
std::fill_n(decoded, last_decoded_length_, 0);
*speech_type = kComfortNoise;
- return last_decoded_length_;
+ return rtc::dchecked_cast<int>(last_decoded_length_);
}
RTC_CHECK_GE(encoded_len, 12);
@@ -42,8 +42,8 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
if (last_decoded_length_ > 0) {
// Use length of last decoded packet, but since this is the total for all
// channels, we have to divide by 2 in the stereo case.
- samples_to_decode = rtc::CheckedDivExact(
- last_decoded_length_, static_cast<size_t>(stereo_ ? 2uL : 1uL));
+ samples_to_decode = rtc::dchecked_cast<int>(rtc::CheckedDivExact(
+ last_decoded_length_, static_cast<size_t>(stereo_ ? 2uL : 1uL)));
} else {
// This is the first packet to decode, and we do not know the length of
// it. Set it to 10 ms.
@@ -70,7 +70,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
std::fill_n(decoded, last_decoded_length_, 0);
*speech_type = kComfortNoise;
cng_mode_ = true;
- return last_decoded_length_;
+ return rtc::dchecked_cast<int>(last_decoded_length_);
}
cng_mode_ = false;
@@ -83,7 +83,8 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
}
*speech_type = kSpeech;
- return last_decoded_length_ = samples_to_decode;
+ last_decoded_length_ = samples_to_decode;
+ return rtc::dchecked_cast<int>(last_decoded_length_);
}
void FakeDecodeFromFile::PrepareEncoded(uint32_t timestamp,
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_processing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698