[FFmpeg-devel] [PATCH] Parsing ALS object type in MPEG-4
Baptiste Coudurier
baptiste.coudurier
Sat Sep 19 00:42:19 CEST 2009
Hi,
On 09/18/2009 03:35 PM, Thilo Borgmann wrote:
> Alex Converse schrieb:
>> On Sun, Aug 23, 2009 at 3:51 PM, Thilo
>> Borgmann<thilo.borgmann at googlemail.com> wrote:
>>> Revision 6 attached (rev. 5 skipped...)
>>>
>>> [...]
>>>
>>> Index: libavcodec/mpeg4audio.h
>>> ===================================================================
>>> --- libavcodec/mpeg4audio.h (revision 19689)
>>> +++ libavcodec/mpeg4audio.h (working copy)
>>> @@ -36,6 +36,7 @@
>>> int ext_sampling_index;
>>> int ext_sample_rate;
>>> int ext_chan_config;
>>> + int channels;
>>> } MPEG4AudioConfig;
>>>
>>> extern const int ff_mpeg4audio_sample_rates[16];
>>> Index: libavformat/mov.c
>>> ===================================================================
>>> --- libavformat/mov.c (revision 19689)
>>> +++ 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
>>
>> The rest of this seems OK but Rob and Baptiste are the maintainers here.
>
Maybe we should always set ->channels in mpeg4audio_get_config, that
would simplify the code everywhere else. What do you think ?
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list