aac afh: do not send the huge audio file header
authorAndre <maan@p133.(none)>
Sat, 13 May 2006 16:37:45 +0000 (18:37 +0200)
committerAndre <maan@p133.(none)>
Sat, 13 May 2006 16:37:45 +0000 (18:37 +0200)
aac_afh.c

index 93d3bec8157702b9f769178d4d9c4ed5e81ecd2e..92b70915621ce3fd4472d9595adb5b9fe5485636 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -215,14 +215,11 @@ static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len)
        if (current_chunk >= num_chunks)
                return NULL;
        if (!current_chunk) {
-               *len = entry;
-               pos = 0;
-       } else if (current_chunk == 1) {
                *len = chunk_table[0];
                pos = entry;
        } else {
-               *len = chunk_table[current_chunk - 1] - chunk_table[current_chunk - 2];
-               pos = entry + chunk_table[current_chunk - 2];
+               *len = chunk_table[current_chunk] - chunk_table[current_chunk - 1];
+               pos = entry + chunk_table[current_chunk - 1];
        }
        if (inbuf_size < *len) {
                inbuf = para_realloc(inbuf, *len);