[FFmpeg-devel] [PATCH] Headerless AAC

Robert Swain robert.swain
Thu Jan 14 09:45:39 CET 2010


On 14/01/10 02:26, Alex Converse wrote:
> This patch allows FFmpeg to decode raw AAC based on just a sample rate and
> channel count signaled to the decoder.

Cool. :)

> diff --git a/libavcodec/aac.c b/libavcodec/aac.c
> index b47b58e..df776d4 100644
> --- a/libavcodec/aac.c
> +++ b/libavcodec/aac.c
> @@ -502,8 +502,30 @@ static av_cold int aac_decode_init(AVCodecContext *avccontext)

[...]

> +        memset(new_che_pos, 0, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0]));
> +        if (set_default_channel_config(ac, new_che_pos, chan_config))
> +            goto done_out_config;
> +        if (output_configure(ac, ac->che_pos, new_che_pos, chan_config, OC_TRIAL_PCE))
> +            goto done_out_config;
> +        ac->m4ac.chan_config = chan_config;
> +        ac->m4ac.sampling_index = sampling_index;
>       }
> +done_out_config:
>
>       avccontext->sample_fmt = SAMPLE_FMT_S16;
>       avccontext->frame_size = 1024;

Hmm, if set_default_channel_config() or output_configure() return an 
error, shouldn't this function also return with an error?

Regards,
Rob



More information about the ffmpeg-devel mailing list