| Index: webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c
|
| diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c
|
| index cacf3ace2895afe0cc7f6d5379d2f9d5cc90bd95..b2d0ef9183716a47704e57e2c0ba2a4066143d12 100644
|
| --- a/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c
|
| +++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c
|
| @@ -24,7 +24,7 @@
|
| * Construct decoded vector from codebook and gains.
|
| *---------------------------------------------------------------*/
|
|
|
| -void WebRtcIlbcfix_CbConstruct(
|
| +int WebRtcIlbcfix_CbConstruct(
|
| int16_t *decvector, /* (o) Decoded vector */
|
| int16_t *index, /* (i) Codebook indices */
|
| int16_t *gain_index, /* (i) Gain quantization indices */
|
| @@ -50,9 +50,12 @@ void WebRtcIlbcfix_CbConstruct(
|
| /* codebook vector construction and construction of total vector */
|
|
|
| /* Stack based */
|
| - WebRtcIlbcfix_GetCbVec(cbvec0, mem, (size_t)index[0], lMem, veclen);
|
| - WebRtcIlbcfix_GetCbVec(cbvec1, mem, (size_t)index[1], lMem, veclen);
|
| - WebRtcIlbcfix_GetCbVec(cbvec2, mem, (size_t)index[2], lMem, veclen);
|
| + if (!WebRtcIlbcfix_GetCbVec(cbvec0, mem, (size_t)index[0], lMem, veclen))
|
| + return 0; // Failure.
|
| + if (!WebRtcIlbcfix_GetCbVec(cbvec1, mem, (size_t)index[1], lMem, veclen))
|
| + return 0; // Failure.
|
| + if (!WebRtcIlbcfix_GetCbVec(cbvec2, mem, (size_t)index[2], lMem, veclen))
|
| + return 0; // Failure.
|
|
|
| gainPtr = &gain[0];
|
| for (j=0;j<veclen;j++) {
|
| @@ -63,5 +66,5 @@ void WebRtcIlbcfix_CbConstruct(
|
| decvector[j] = (int16_t)((a32 + 8192) >> 14);
|
| }
|
|
|
| - return;
|
| + return 1; // Success.
|
| }
|
|
|