WebRtcG722_Decode: Input array should be const uint8_t[]

BUG=909
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38799004

Cr-Commit-Position: refs/heads/master@{#8224}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8224 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2015-02-02 08:58:03 +00:00
parent 026b892e72
commit a1dfbf1e5c
4 changed files with 15 additions and 18 deletions

View File

@ -86,7 +86,7 @@ int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst)
}
int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst,
int16_t *encoded,
const uint8_t *encoded,
int16_t len,
int16_t *decoded,
int16_t *speechType)
@ -94,7 +94,7 @@ int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst,
// Decode the G.722 encoder stream
*speechType=G722_WEBRTC_SPEECH;
return WebRtc_g722_decode((G722DecoderState*) G722dec_inst,
decoded, (uint8_t*) encoded, len);
decoded, encoded, len);
}
int16_t WebRtcG722_Version(char *versionStr, short len)

View File

@ -168,7 +168,7 @@ int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst);
*/
int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst,
int16_t *encoded,
const uint8_t* encoded,
int16_t len,
int16_t *decoded,
int16_t *speechType);

View File

@ -124,9 +124,8 @@ int main(int argc, char* argv[])
/* G.722 encoding + decoding */
stream_len = WebRtcG722_Encode((G722EncInst *)G722enc_inst, shortdata, framelength, streamdata);
err = WebRtcG722_Decode(G722dec_inst,
reinterpret_cast<int16_t*>(streamdata),
stream_len, decoded, speechType);
err = WebRtcG722_Decode(G722dec_inst, streamdata, stream_len, decoded,
speechType);
/* Stop clock after call to encoder and decoder */
runtime += (double)((clock()/(double)CLOCKS_PER_SEC_G722)-starttime);