Index: webrtc/common_audio/vad/webrtc_vad.c |
diff --git a/webrtc/common_audio/vad/webrtc_vad.c b/webrtc/common_audio/vad/webrtc_vad.c |
index 5af1b5bb0bcf0c34ca964e3452e0ccb61ec7d968..80c8f3c88d8eadcc55aee275ea8f23ae24bd6594 100644 |
--- a/webrtc/common_audio/vad/webrtc_vad.c |
+++ b/webrtc/common_audio/vad/webrtc_vad.c |
@@ -56,7 +56,7 @@ int WebRtcVad_set_mode(VadInst* handle, int mode) { |
} |
int WebRtcVad_Process(VadInst* handle, int fs, const int16_t* audio_frame, |
- int frame_length) { |
+ size_t frame_length) { |
int vad = -1; |
VadInstT* self = (VadInstT*) handle; |
@@ -90,11 +90,11 @@ int WebRtcVad_Process(VadInst* handle, int fs, const int16_t* audio_frame, |
return vad; |
} |
-int WebRtcVad_ValidRateAndFrameLength(int rate, int frame_length) { |
+int WebRtcVad_ValidRateAndFrameLength(int rate, size_t frame_length) { |
int return_value = -1; |
size_t i; |
int valid_length_ms; |
- int valid_length; |
+ size_t valid_length; |
// We only allow 10, 20 or 30 ms frames. Loop through valid frame rates and |
// see if we have a matching pair. |
@@ -102,7 +102,7 @@ int WebRtcVad_ValidRateAndFrameLength(int rate, int frame_length) { |
if (kValidRates[i] == rate) { |
for (valid_length_ms = 10; valid_length_ms <= kMaxFrameLengthMs; |
valid_length_ms += 10) { |
- valid_length = (kValidRates[i] / 1000 * valid_length_ms); |
+ valid_length = (size_t)(kValidRates[i] / 1000 * valid_length_ms); |
if (frame_length == valid_length) { |
return_value = 0; |
break; |