From b7a6a11306c34cb29f914b4c1ab5e01ba5ec83d5 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 5 May 2006 15:28:11 +0200 Subject: [PATCH] aacdec: Fix some signedness issues --- aacdec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aacdec.c b/aacdec.c index 5e532006..e0890da9 100644 --- a/aacdec.c +++ b/aacdec.c @@ -44,13 +44,13 @@ struct private_mp4dec_data { mp4AudioSpecificConfig mp4ASC; int initialized; - char *inbuf; + unsigned char *inbuf; int inbuf_len; int consumed; long unsigned consumed_total; - int noffsets; - int *offset; + unsigned noffsets; + unsigned *offset; int offset_pos; }; @@ -73,7 +73,7 @@ static int read_mp4_descr_length(struct private_mp4dec_data *padd) static int find_esds(struct private_mp4dec_data *padd) { for (; padd->consumed < padd->inbuf_len; padd->consumed++) { - char *p = padd->inbuf + padd->consumed; + unsigned char *p = padd->inbuf + padd->consumed; int decoder_length; if (p[0] != 'e' || p[1] != 's' || p[2] != 'd' || p[3] != 's') @@ -135,7 +135,7 @@ static int find_stco(struct private_mp4dec_data *padd) int ret; for (; padd->consumed < padd->inbuf_len; padd->consumed++) { - char *p = padd->inbuf + padd->consumed; + unsigned char *p = padd->inbuf + padd->consumed; if (p[0] != 's' || p[1] != 't' || p[2] != 'c' || p[3] != 'o') continue; @@ -163,7 +163,7 @@ static ssize_t mp4dec(char *inbuffer, size_t len, struct filter_node *fn) if (len < 1000 && !*fci->eof) return 0; padd->consumed = 0; - padd->inbuf = inbuffer; + padd->inbuf = (unsigned char*)inbuffer; padd->inbuf_len = len; if (!padd->initialized) { @@ -171,7 +171,7 @@ static ssize_t mp4dec(char *inbuffer, size_t len, struct filter_node *fn) if (ret < 0) goto out; - p = inbuffer + padd->consumed; + p = padd->inbuf + padd->consumed; ret = E_AACDEC_INIT; if (NeAACDecInit2(padd->decoder, p, ret, &rate, &channels) < 0) { PARA_INFO_LOG("header not found, consumed: %d\n", -- 2.39.5