Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that currently only works correctly with signed types work safely regardless of the signedness of the types in question. This is preparation for a future change that will convert a variety of types to size_t. There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants. BUG=none R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org TBR=ajm Review URL: https://codereview.webrtc.org/1174813003 Cr-Commit-Position: refs/heads/master@{#9413}
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -139,6 +139,10 @@ int main(int argc, char* argv[])
|
||||
#else
|
||||
len=WebRtcIlbcfix_Encode(Enc_Inst, data, (short)(mode<<3), encoded_data);
|
||||
#endif
|
||||
if (len < 0) {
|
||||
fprintf(stderr, "Error encoding\n");
|
||||
exit(0);
|
||||
}
|
||||
fprintf(stderr, "\r");
|
||||
|
||||
#ifdef JUNK_DATA
|
||||
@ -176,6 +180,10 @@ int main(int argc, char* argv[])
|
||||
if (pli==1) {
|
||||
len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, (int16_t)len, data,
|
||||
&speechType);
|
||||
if (len < 0) {
|
||||
fprintf(stderr, "Error decoding\n");
|
||||
exit(0);
|
||||
}
|
||||
} else {
|
||||
len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user