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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments + resync Created 5 years, 6 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/ilbc/test/iLBC_test.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c
index 3daf186ce69dbd327fa14e65b22239b8bda2afd1..9c42037b2e0c85c407c216f4549a6b27d7f900d6 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c
@@ -165,6 +165,10 @@ int main(int argc, char* argv[])
fprintf(stderr, "--- Encoding block %i --- ",blockcount);
len = WebRtcIlbcfix_Encode(Enc_Inst, data, (int16_t)frameLen, encoded_data);
+ if (len < 0) {
+ fprintf(stderr, "Error encoding\n");
+ exit(0);
+ }
fprintf(stderr, "\r");
/* write byte file */
@@ -202,6 +206,10 @@ int main(int argc, char* argv[])
if (pli==1) {
len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data,
(int16_t)len, decoded_data,&speechType);
+ if (len < 0) {
+ fprintf(stderr, "Error decoding\n");
+ exit(0);
+ }
} else {
len=WebRtcIlbcfix_DecodePlc(Dec_Inst, decoded_data, 1);
}

Powered by Google App Engine
This is Rietveld 408576698