[FFmpeg-devel] [PATCH] Parsing ALS object type in MPEG-4

Alex Converse alex.converse
Wed Nov 11 21:29:38 CET 2009


On Sun, Oct 11, 2009 at 5:04 AM, Thilo Borgmann
<thilo.borgmann at googlemail.com> wrote:
> Index: libavcodec/mpeg4audio.h
> ===================================================================
> --- libavcodec/mpeg4audio.h ? ? (revision 20011)
> +++ libavcodec/mpeg4audio.h ? ? (working copy)
> @@ -31,6 +31,7 @@
> ? ? int sampling_index;
> ? ? int sample_rate;
> ? ? int chan_config;
> + ? ?int channels;
> ? ? int sbr; //< -1 implicit, 1 presence
> ? ? int ext_object_type;
> ? ? int ext_sampling_index;
> Index: libavformat/mov.c
> ===================================================================
> --- libavformat/mov.c ? (revision 20011)
> +++ libavformat/mov.c ? (working copy)
> @@ -434,9 +434,13 @@
> ? ? ? ? ? ? ? ? MPEG4AudioConfig cfg;
> ? ? ? ? ? ? ? ? ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?st->codec->extradata_size);
> + ? ? ? ? ? ? ? ?if (cfg.chan_config) {
> ? ? ? ? ? ? ? ? if (cfg.chan_config > 7)
> ? ? ? ? ? ? ? ? ? ? return -1;
> ? ? ? ? ? ? ? ? st->codec->channels = ff_mpeg4audio_channels[cfg.chan_config];
> + ? ? ? ? ? ? ? ?} else {
> + ? ? ? ? ? ? ? ? ? ?st->codec->channels = cfg.channels;
> + ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ? if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4
> ? ? ? ? ? ? ? ? ? ? st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index];
> ? ? ? ? ? ? ? ? else
>

These chunks have landed as part of r20512.



More information about the ffmpeg-devel mailing list