]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aacdec.c
aacdec: Fix some signedness issues
[paraslash.git] / aacdec.c
index 5e5320065baf9f97b6e2706a3a3de596368fa039..e0890da9dcd9e95fd78884ad2e65014e89573dc7 100644 (file)
--- 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",