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..4c72a6e72f6ea03e7ee29c6f2e61ca86fbb9a3aa 100644 |
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c |
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_construct.c |
@@ -16,6 +16,8 @@ |
******************************************************************/ |
+#include "cb_construct.h" |
+ |
#include "defines.h" |
#include "gain_dequant.h" |
#include "get_cd_vec.h" |
@@ -24,7 +26,7 @@ |
* Construct decoded vector from codebook and gains. |
*---------------------------------------------------------------*/ |
-void WebRtcIlbcfix_CbConstruct( |
+bool WebRtcIlbcfix_CbConstruct( |
int16_t *decvector, /* (o) Decoded vector */ |
int16_t *index, /* (i) Codebook indices */ |
int16_t *gain_index, /* (i) Gain quantization indices */ |
@@ -50,9 +52,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 false; // Failure. |
+ if (!WebRtcIlbcfix_GetCbVec(cbvec1, mem, (size_t)index[1], lMem, veclen)) |
+ return false; // Failure. |
+ if (!WebRtcIlbcfix_GetCbVec(cbvec2, mem, (size_t)index[2], lMem, veclen)) |
+ return false; // Failure. |
gainPtr = &gain[0]; |
for (j=0;j<veclen;j++) { |
@@ -63,5 +68,5 @@ void WebRtcIlbcfix_CbConstruct( |
decvector[j] = (int16_t)((a32 + 8192) >> 14); |
} |
- return; |
+ return true; // Success. |
} |