X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aac_afh.c;h=92b70915621ce3fd4472d9595adb5b9fe5485636;hp=93d3bec8157702b9f769178d4d9c4ed5e81ecd2e;hb=1a1048fc81f384826d4cd7416de931f4b6c5646e;hpb=f2fa810c4bac275b4dc3ea9cd8b48d77e204618d diff --git a/aac_afh.c b/aac_afh.c index 93d3bec8..92b70915 100644 --- 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);