Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-30 06:16:51 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-30 06:16:51 +0300
commit164f7dfa0272d89a38dc73aaeb8a0b6d885eb972 (patch)
treef2ec82f76a246a3f3aa9c0f93eee74ab9fcde1ea /src/opus_demo.c
parent9b1a27a3bce47ccccb24f7caf8918e898044470a (diff)
Addressing more issues from scan-build
Diffstat (limited to 'src/opus_demo.c')
-rw-r--r--src/opus_demo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/opus_demo.c b/src/opus_demo.c
index 9e99a3b2..7c930699 100644
--- a/src/opus_demo.c
+++ b/src/opus_demo.c
@@ -591,10 +591,11 @@ int main(int argc, char *argv[])
in = (short*)malloc(max_frame_size*channels*sizeof(short));
out = (short*)malloc(max_frame_size*channels*sizeof(short));
+ /* We need to allocate for 16-bit PCM data, but we store it as unsigned char. */
fbytes = (unsigned char*)malloc(max_frame_size*channels*sizeof(short));
- data[0] = (unsigned char*)calloc(max_payload_bytes,sizeof(char));
+ data[0] = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char));
if ( use_inbandfec ) {
- data[1] = (unsigned char*)calloc(max_payload_bytes,sizeof(char));
+ data[1] = (unsigned char*)calloc(max_payload_bytes,sizeof(unsigned char));
}
if(delayed_decision)
{