Chromium Code Reviews| Index: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
| diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
| index 6bcd717279b8b5bf4ce8423eaec62b825908997c..3dfc799a7f84a5ef229912dd1be1cdd183704958 100644 |
| --- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
| +++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc |
| @@ -324,7 +324,7 @@ size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file, |
| // Encode it as PCM16. |
| assert((*payload).get()); |
| payload_len = WebRtcPcm16b_Encode((*replacement_audio).get(), |
| - static_cast<int16_t>(*frame_size_samples), |
| + *frame_size_samples, |
| (*payload).get()); |
| assert(payload_len == 2 * *frame_size_samples); |
| // Change payload type to PCM16. |
| @@ -358,7 +358,7 @@ size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file, |
| int main(int argc, char* argv[]) { |
| static const int kMaxChannels = 5; |
| - static const int kMaxSamplesPerMs = 48000 / 1000; |
| + static const size_t kMaxSamplesPerMs = 48000 / 1000; |
| static const int kOutputBlockSizeMs = 10; |
| std::string program_name = argv[0]; |
| @@ -552,11 +552,11 @@ int main(int argc, char* argv[]) { |
| // Check if it is time to get output audio. |
| if (time_now_ms >= next_output_time_ms) { |
| - static const int kOutDataLen = |
| + static const size_t kOutDataLen = |
| kOutputBlockSizeMs * kMaxSamplesPerMs * kMaxChannels; |
| int16_t out_data[kOutDataLen]; |
| int num_channels; |
| - int samples_per_channel; |
| + size_t samples_per_channel; |
| int error = neteq->GetAudio(kOutDataLen, out_data, &samples_per_channel, |
| &num_channels, NULL); |
| if (error != NetEq::kOK) { |
| @@ -564,7 +564,8 @@ int main(int argc, char* argv[]) { |
| neteq->LastError() << std::endl; |
| } else { |
| // Calculate sample rate from output size. |
| - sample_rate_hz = 1000 * samples_per_channel / kOutputBlockSizeMs; |
| + sample_rate_hz = |
| + static_cast<int>(1000 * samples_per_channel / kOutputBlockSizeMs); |
|
hlundin-webrtc
2015/08/10 11:30:02
rtc::checked_cast
Peter Kasting
2015/08/17 22:49:47
Done.
|
| } |
| // Write to file. |