-/*
- * nothing to do as we'll seek to the correct offset in aac read_chunk() anyway
- */
-static int aac_reposition_stream(__a_unused long unsigned request)
-{
- return 1;
-}
-
-static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len)
-{
- int ret;
- size_t pos;
-
- *len = 0;
- if (current_chunk >= num_chunks)
- return NULL;
- pos = chunk_table[current_chunk];
- *len = chunk_table[current_chunk + 1] - chunk_table[current_chunk];
- if (inbuf_size < *len) {
- PARA_INFO_LOG("increasing inbuf for chunk #%lu/%zu to %zd bytes\n",
- current_chunk, num_chunks, *len);
- inbuf = para_realloc(inbuf, *len);
- inbuf_size = *len;
- }
-// PARA_DEBUG_LOG("reading chunk #%lu@%zd (%zd bytes)\n", current_chunk,
-// pos, *len);
- ret = fseek(infile, pos, SEEK_SET);
- if (ret < 0)
- return NULL;
- ret = para_fread(inbuf, *len, 1, infile);
- if (ret != *len)
- return NULL;
-// PARA_DEBUG_LOG("ret: %d, inbuf[0]: %lx - %lx\n", ret, (long unsigned) inbuf[0],
-// (long unsigned) inbuf[4]);
- return (char *)inbuf;
-}
-
-