Rename struct audio format to audio_format_handler
[paraslash.git] / aacdec.c
index 54b4229..c36f687 100644 (file)
--- a/aacdec.c
+++ b/aacdec.c
@@ -15,7 +15,6 @@
  *     along with this program; if not, write to the Free Software
  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */
-
 /*
  * based in parts on libfaad, Copyright (C) 2003-2005 M. Bakker,
  * Ahead Software AG
@@ -46,18 +45,18 @@ struct private_aacdec_data {
 
        int initialized;
        int decoder_length;
-       long unsigned consumed_total;
-       long unsigned entry;
+       size_t consumed_total;
+       size_t entry;
 };
 
 static ssize_t aacdec(char *input_buffer, size_t len, struct filter_node *fn)
 {
        struct private_aacdec_data *padd = fn->private_data;
        struct filter_chain_info *fci = fn->fci;
-       int i, ret, skip;
+       int i, ret;
        unsigned char *p, *outbuffer;
        unsigned char *inbuf = (unsigned char*)input_buffer;
-       size_t consumed = 0;
+       size_t skip, consumed = 0;
 
        if (fn->loaded > fn->bufsize * 4 / 5)
                return 0;
@@ -96,15 +95,15 @@ static ssize_t aacdec(char *input_buffer, size_t len, struct filter_node *fn)
        if (padd->decoder_length > 0) {
                consumed = 0;
                if (!padd->entry) {
-                       ret = aac_find_entry(inbuf + consumed, len - consumed,
-                               &skip);
+                       ret = aac_find_entry_point(inbuf + consumed,
+                               len - consumed, &skip);
                        if (ret < 0) {
                                ret = len;
                                goto out;
                        }
                        consumed += skip;
                        padd->entry = ret;
-                       PARA_INFO_LOG("entry: %lu\n", padd->entry);
+                       PARA_INFO_LOG("entry: %zu\n", padd->entry);
                }
                ret = len;
                if (padd->consumed_total + len < padd->entry)
@@ -122,7 +121,7 @@ static ssize_t aacdec(char *input_buffer, size_t len, struct filter_node *fn)
                len - consumed);
        ret = -E_AAC_DECODE;
        if (padd->frame_info.error != 0) {
-               PARA_ERROR_LOG("frame_error: %d, consumed: %lu + %d + %lu\n",
+               PARA_ERROR_LOG("frame_error: %d, consumed: %zu + %zd + %lu\n",
                        padd->frame_info.error, padd->consumed_total,
                        consumed, padd->frame_info.bytesconsumed);
                PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(