[FFmpeg-devel] [PATCH] als in mp4
Baptiste Coudurier
baptiste.coudurier
Wed Apr 8 07:08:59 CEST 2009
Hi Jai,
On 4/6/2009 5:12 AM, Jai Menon wrote:
> On Fri, Apr 3, 2009 at 11:28 PM, Baptiste Coudurier
>
> [...]
>
> diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
> index 9c7e02b..b391609 100644
> --- a/libavcodec/mpeg4audio.c
> +++ b/libavcodec/mpeg4audio.c
> @@ -55,6 +55,8 @@ int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_si
> c->object_type = get_object_type(&gb);
> c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
> c->chan_config = get_bits(&gb, 4);
> + c->absolute_channels = 0;
> + c->bits_per_sample = 0;
> c->sbr = -1;
> if (c->object_type == 5) {
> c->ext_object_type = c->object_type;
> @@ -80,5 +82,11 @@ int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_si
> get_bits1(&gb); // skip 1 bit
> }
> }
> + if (c->object_type == AOT_ALS) {
> + c->absolute_channels = 1;
> + c->sample_rate = AV_RB32(buf + 10);
> + c->chan_config = AV_RB16(buf + 18) + 1;
> + c->bits_per_sample = (((buf[20] >> 2) & 0x07) + 1) << 3;
> + }
There is something I don't understand according to the code above,
position might not be fixed depending on several conditions.
How can you read at fixed position in "buf" ?
It would depends on what has been read.
Futhermore, I don't get why ALS does not use correctly sample rate like
others AOT. Can you please explain/quote specs ?
[...]
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list