Merge branch 'maint'
[paraslash.git] / aac_common.c
index 8fc9523..812c742 100644 (file)
@@ -13,6 +13,7 @@
 #include "para.h"
 #include "aac.h"
 #include "error.h"
+#include "portable_io.h"
 
 /**
  * Get a new libfaad decoder handle.
@@ -72,18 +73,18 @@ int aac_find_esds(char *buf, size_t buflen, size_t *skip,
                        continue;
                i += 8;
                p = buf + i;
-               PARA_INFO_LOG("found esds@%zu, next: %x\n", i, *p);
+               PARA_INFO_LOG("found esds@%zu, next: %x\n", i, (unsigned)*p);
                if (*p == 3)
                        i += 8;
                else
                        i += 6;
                p = buf + i;
-               PARA_INFO_LOG("next: %x\n", *p);
+               PARA_INFO_LOG("next: %x\n", (unsigned)*p);
                if (*p != 4)
                        continue;
                i += 18;
                p = buf + i;
-               PARA_INFO_LOG("next: %x\n", *p);
+               PARA_INFO_LOG("next: %x\n", (unsigned)*p);
                if (*p != 5)
                        continue;
                i++;
@@ -120,7 +121,7 @@ ssize_t aac_find_entry_point(char *buf, size_t buflen, size_t *skip)
                        continue;
                PARA_INFO_LOG("found stco@%zu\n", i);
                i += 12;
-               ret = aac_read_int32(buf + i); /* first offset */
+               ret = read_u32_be(buf + i); /* first offset */
                i += 4;
                PARA_INFO_LOG("entry point: %zd\n", ret);
                *skip = i;