static int inbuf_size;
static unsigned char *inbuf;
static size_t inbuf_len;
-struct audio_format *af;
+struct audio_format_handler *af;
static size_t num_chunks;
static size_t entry;
static size_t *chunk_table;
NeAACDecHandle handle;
-
static void aac_close_audio_file(void)
{
+ if (!infile)
+ return;
+ fclose(infile);
+ infile = NULL;
}
static int aac_find_stsz(unsigned char *buf, unsigned buflen, size_t *skip)
return (char *)inbuf;
}
-void aac_afh_init(void *p)
+static const char* aac_suffixes[] = {"m4a", NULL};
+/** the init function of the aac audio format handler */
+void aac_afh_init(struct audio_format_handler *p)
{
af = p;
af->reposition_stream = aac_reposition_stream;
af->chunk_tv.tv_sec = 0;
af->chunk_tv.tv_usec = 23120;
tv_scale(3, &af->chunk_tv, &af->eof_tv);
+ af->suffixes = aac_suffixes;
}