1
0
mirror of https://github.com/nu774/fdkaac.git synced 2025-01-23 20:20:43 +01:00
This commit is contained in:
nu774 2013-01-19 18:19:10 +09:00
parent 5af13f7d79
commit 7b1f213618
3 changed files with 16 additions and 16 deletions

View File

@ -82,7 +82,7 @@ void aacenc_free_mainargs(void)
{
char **p = __aacenc_argv__;
for (; *p; ++p)
free(*p);
free(*p);
free(__aacenc_argv__);
}

View File

@ -1142,7 +1142,7 @@ int m4af_finalize(m4af_writer_t *ctx)
track = ctx->track + i;
if (track->duration) {
int64_t track_size = 0;
unsigned j;
unsigned j;
for (j = 0; j < track->num_chunks; ++j)
track_size += track->chunk_table[j].size;
track->avgBitrate =
@ -1176,15 +1176,15 @@ void m4af_teardown(m4af_writer_t **ctxp)
m4af_writer_t *ctx = *ctxp;
m4af_track_t *track;
for (i = 0; i < ctx->num_tracks; ++i) {
track = ctx->track + i;
if (track->decSpecificInfo)
m4af_free(track->decSpecificInfo);
if (track->sample_table)
m4af_free(track->sample_table);
if (track->chunk_table)
m4af_free(track->chunk_table);
if (track->chunk_buffer)
m4af_free(track->chunk_buffer);
track = ctx->track + i;
if (track->decSpecificInfo)
m4af_free(track->decSpecificInfo);
if (track->sample_table)
m4af_free(track->sample_table);
if (track->chunk_table)
m4af_free(track->chunk_table);
if (track->chunk_buffer)
m4af_free(track->chunk_buffer);
}
if (ctx->itmf_table)
m4af_free_itmf_table(ctx);

View File

@ -770,10 +770,10 @@ int main(int argc, char **argv)
if (!params.transport_format) {
uint32_t scale;
unsigned framelen = aacinfo.frameLength;
int sbr_mode = aacenc_is_sbr_active((aacenc_param_t*)&params);
int sig_mode = aacEncoder_GetParam(encoder, AACENC_SIGNALING_MODE);
if (sbr_mode && !sig_mode)
downsampled_timescale = 1;
int sbr_mode = aacenc_is_sbr_active((aacenc_param_t*)&params);
int sig_mode = aacEncoder_GetParam(encoder, AACENC_SIGNALING_MODE);
if (sbr_mode && !sig_mode)
downsampled_timescale = 1;
scale = sample_format->sample_rate >> downsampled_timescale;
if ((m4af = m4af_create(M4AF_CODEC_MP4A, scale, &m4af_io, ofp)) < 0)
goto END;
@ -787,7 +787,7 @@ int main(int argc, char **argv)
goto END;
if (m4af) {
uint32_t delay = aacinfo.encoderDelay;
int64_t frames_read = wav_get_position(wavf);
int64_t frames_read = wav_get_position(wavf);
uint32_t padding = frame_count * aacinfo.frameLength
- frames_read - aacinfo.encoderDelay;
m4af_set_priming(m4af, 0, delay >> downsampled_timescale,