* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
-/** \file aac_afh.c para_server's aac audio format handler */
+/*
+ * based in parts on libfaad, Copyright (C) 2003-2005 M. Bakker,
+ * Ahead Software AG
+ */
+/** \file aac_afh.c para_server's aac audio format handler */
#include "server.cmdline.h"
#include "server.h"
return sample_count;
}
PARA_WARNING_LOG("stsz not found, buflen: %d\n", buflen);
- return -E_STCO;
+ return -E_STSZ;
}
-
-static int read_stsz(unsigned skip)
+static int read_chunk_table(unsigned skip)
{
int ret, i;
long unsigned sum = 0;
}
-
/*
* Init m4a file and write some tech data to given pointers.
*/
} else
PARA_WARNING_LOG("no mp4ASC %s\n", "");
- ret = read_stsz(skip);
+ ret = read_chunk_table(skip);
if (ret < 0)
return ret;
*frames = num_chunks;
for (;;) {
- ret = aac_find_entry(inbuf, inbuf_len, &skip);
+ ret = aac_find_entry_point(inbuf, inbuf_len, &skip);
if (ret >= 0)
break;
ret = read(fileno(infile), inbuf, inbuf_size);
*/
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;