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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h

Issue 2255203002: iLBC: Handle a case of bad input data (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: bool test Created 4 years, 4 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/get_cd_vec.h
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h b/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h
index 07f67a2aa5eaaf561dee9ed4ad0db9606e53f07b..b770e761d706044ee62ff4fc3ebf57f17751fc78 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.h
@@ -19,12 +19,18 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GET_CD_VEC_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_GET_CD_VEC_H_
-void WebRtcIlbcfix_GetCbVec(
- int16_t *cbvec, /* (o) Constructed codebook vector */
- int16_t *mem, /* (i) Codebook buffer */
+#include <stdbool.h>
+
+#include "defines.h"
+
+// Returns true on success, false on failure. In case of failure, the decoder
+// state may be corrupted and needs resetting.
+bool WebRtcIlbcfix_GetCbVec(
+ int16_t* cbvec, /* (o) Constructed codebook vector */
+ int16_t* mem, /* (i) Codebook buffer */
size_t index, /* (i) Codebook index */
- size_t lMem, /* (i) Length of codebook buffer */
- size_t cbveclen /* (i) Codebook vector length */
- );
+ size_t lMem, /* (i) Length of codebook buffer */
+ size_t cbveclen /* (i) Codebook vector length */
+ ) WARN_UNUSED_RESULT;
#endif
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/encode.c ('k') | webrtc/modules/audio_coding/codecs/ilbc/get_cd_vec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698