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

Unified Diff: webrtc/modules/audio_coding/codecs/g711/g711_interface.c

Issue 1225173002: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments Created 5 years, 4 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/codecs/g711/g711_interface.c
diff --git a/webrtc/modules/audio_coding/codecs/g711/g711_interface.c b/webrtc/modules/audio_coding/codecs/g711/g711_interface.c
index b5795209f70bf35c07cd7531cbdb3822fa91f013..5b96a9c5553f41747f9c13d85116d7ec09053b1b 100644
--- a/webrtc/modules/audio_coding/codecs/g711/g711_interface.c
+++ b/webrtc/modules/audio_coding/codecs/g711/g711_interface.c
@@ -12,40 +12,40 @@
#include "g711_interface.h"
#include "webrtc/typedefs.h"
-int16_t WebRtcG711_EncodeA(const int16_t* speechIn,
- int16_t len,
- uint8_t* encoded) {
- int n;
+size_t WebRtcG711_EncodeA(const int16_t* speechIn,
+ size_t len,
+ uint8_t* encoded) {
+ size_t n;
for (n = 0; n < len; n++)
encoded[n] = linear_to_alaw(speechIn[n]);
return len;
}
-int16_t WebRtcG711_EncodeU(const int16_t* speechIn,
- int16_t len,
- uint8_t* encoded) {
- int n;
+size_t WebRtcG711_EncodeU(const int16_t* speechIn,
+ size_t len,
+ uint8_t* encoded) {
+ size_t n;
for (n = 0; n < len; n++)
encoded[n] = linear_to_ulaw(speechIn[n]);
return len;
}
-int16_t WebRtcG711_DecodeA(const uint8_t* encoded,
- int16_t len,
- int16_t* decoded,
- int16_t* speechType) {
- int n;
+size_t WebRtcG711_DecodeA(const uint8_t* encoded,
+ size_t len,
+ int16_t* decoded,
+ int16_t* speechType) {
+ size_t n;
for (n = 0; n < len; n++)
decoded[n] = alaw_to_linear(encoded[n]);
*speechType = 1;
return len;
}
-int16_t WebRtcG711_DecodeU(const uint8_t* encoded,
- int16_t len,
- int16_t* decoded,
- int16_t* speechType) {
- int n;
+size_t WebRtcG711_DecodeU(const uint8_t* encoded,
+ size_t len,
+ int16_t* decoded,
+ int16_t* speechType) {
+ size_t n;
for (n = 0; n < len; n++)
decoded[n] = ulaw_to_linear(encoded[n]);
*speechType = 1;

Powered by Google App Engine
This is Rietveld 408576698