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

Unified Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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/acm2/audio_coding_module_impl.cc
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
index b434da20720e3bc310523b34721cff498d257a69..ac302f0fe3c304f035c54ed2f20062ea1b139040 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
@@ -324,7 +324,7 @@ int AudioCodingModuleImpl::Add10MsDataInternal(const AudioFrame& audio_frame,
}
// Check whether we need an up-mix or down-mix?
- const int current_num_channels =
+ const size_t current_num_channels =
rent_a_codec_.GetEncoderStack()->NumChannels();
const bool same_num_channels =
ptr_frame->num_channels_ == current_num_channels;
@@ -589,7 +589,7 @@ int AudioCodingModuleImpl::PlayoutFrequency() const {
int AudioCodingModuleImpl::RegisterReceiveCodec(const CodecInst& codec) {
CriticalSectionScoped lock(acm_crit_sect_.get());
RTC_DCHECK(receiver_initialized_);
- if (codec.channels > 2 || codec.channels < 0) {
+ if (codec.channels > 2) {
LOG_F(LS_ERROR) << "Unsupported number of channels: " << codec.channels;
return -1;
}

Powered by Google App Engine
This is Rietveld 408576698