*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (skip + 4 > inbuf_len) {
skip = inbuf_len - skip;
memmove(inbuf, inbuf + inbuf_len - skip, skip);
if (skip + 4 > inbuf_len) {
skip = inbuf_len - skip;
memmove(inbuf, inbuf + inbuf_len - skip, skip);
{
float tmp = mp4ASC->sbr_present_flag == 1? 2047 : 1023,
ms = 1000.0 * num_chunks * tmp / mp4ASC->samplingFrequency;
{
float tmp = mp4ASC->sbr_present_flag == 1? 2047 : 1023,
ms = 1000.0 * num_chunks * tmp / mp4ASC->samplingFrequency;
static int aac_get_file_info(FILE *file, char *info_str, long unsigned *frames,
int *seconds)
{
static int aac_get_file_info(FILE *file, char *info_str, long unsigned *frames,
int *seconds)
{
- if (!current_chunk) {
- *len = chunk_table[0];
- pos = entry;
- } else {
- *len = chunk_table[current_chunk] - chunk_table[current_chunk - 1];
- pos = entry + chunk_table[current_chunk - 1];
- }
+ *len = chunk_table[current_chunk + 1] - chunk_table[current_chunk];
+ if (!*len) /* nothing to send for this run */
+ return inbuf;
+ pos = chunk_table[current_chunk];
/** the init function of the aac audio format handler */
void aac_afh_init(struct audio_format_handler *p)
{
af = p;
/** the init function of the aac audio format handler */
void aac_afh_init(struct audio_format_handler *p)
{
af = p;
af->get_file_info = aac_get_file_info,
af->read_chunk = aac_read_chunk;
af->close_audio_file = aac_close_audio_file;
af->get_file_info = aac_get_file_info,
af->read_chunk = aac_read_chunk;
af->close_audio_file = aac_close_audio_file;