return sample_count;
}
PARA_WARNING_LOG("stsz not found, buflen: %d\n", buflen);
- return -E_STCO;
+ return -E_STSZ;
}
static int read_chunk_table(unsigned skip)
*/
static int aac_reposition_stream(long unsigned request)
{
- return -E_AAC_REPOS;
+ return 1;
+// return -E_AAC_REPOS;
}
static __must_check int para_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
return -E_FREAD;
}
-char *aac_read_chunk(long unsigned current_chunk, ssize_t *len)
+static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len)
{
int ret;
size_t pos;
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);