Index: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc |
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc |
index ba5959dbcd5c32571e7ab53db0af2c1f4034437f..127751c5ddb4e1b930c2d041e8d915e568f209f7 100644 |
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc |
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc |
@@ -19,11 +19,13 @@ |
namespace webrtc { |
namespace { |
-int16_t NumSamplesPerFrame(int num_channels, |
+int16_t NumSamplesPerFrame(size_t num_channels, |
int frame_size_ms, |
int sample_rate_hz) { |
- int samples_per_frame = num_channels * frame_size_ms * sample_rate_hz / 1000; |
- CHECK_LE(samples_per_frame, std::numeric_limits<int16_t>::max()) |
+ size_t samples_per_frame = |
+ num_channels * frame_size_ms * sample_rate_hz / 1000; |
+ CHECK_LE(samples_per_frame, |
+ static_cast<size_t>(std::numeric_limits<int16_t>::max())) |
<< "Frame size too large."; |
return static_cast<int16_t>(samples_per_frame); |
} |
@@ -56,7 +58,7 @@ int AudioEncoderPcm::SampleRateHz() const { |
return sample_rate_hz_; |
} |
-int AudioEncoderPcm::NumChannels() const { |
+size_t AudioEncoderPcm::NumChannels() const { |
return num_channels_; |
} |