Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
index 37ce8733fed21268db49a942eb3cb1c7a7a1b76b..e786cc12ec8407e6ccb7f441ae608c665c317e4d 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
@@ -67,8 +67,8 @@ AudioEncoderOpus::AudioEncoderOpus(const Config& config) |
payload_type_(config.payload_type), |
application_(config.application), |
dtx_enabled_(config.dtx_enabled), |
- samples_per_10ms_frame_(static_cast<size_t>( |
- rtc::CheckedDivExact(kSampleRateHz, 100) * num_channels_)), |
+ samples_per_10ms_frame_( |
+ rtc::CheckedDivExact(kSampleRateHz, 100) * num_channels_), |
packet_loss_rate_(0.0) { |
CHECK(config.IsOk()); |
input_buffer_.reserve(num_10ms_frames_per_packet_ * samples_per_10ms_frame_); |
@@ -97,7 +97,7 @@ int AudioEncoderOpus::SampleRateHz() const { |
return kSampleRateHz; |
} |
-int AudioEncoderOpus::NumChannels() const { |
+size_t AudioEncoderOpus::NumChannels() const { |
return num_channels_; |
} |
@@ -193,8 +193,7 @@ AudioEncoder::EncodedInfo AudioEncoderOpus::EncodeInternal( |
num_10ms_frames_per_packet_ * samples_per_10ms_frame_); |
int status = WebRtcOpus_Encode( |
inst_, &input_buffer_[0], |
- rtc::CheckedDivExact(input_buffer_.size(), |
- static_cast<size_t>(num_channels_)), |
+ rtc::CheckedDivExact(input_buffer_.size(), num_channels_), |
max_encoded_bytes, encoded); |
CHECK_GE(status, 0); // Fails only if fed invalid data. |
input_buffer_.clear(); |