[FFmpeg-devel] [PATCH] [2/2] add the id3v2 parsing for adts aac, take 4
Patrick Dehne
patrick
Wed Jun 17 09:29:04 CEST 2009
Michael Niedermayer <michaelni at gmx.at> writes:
> On Fri, Jun 12, 2009 at 11:02:56PM +0200, Patrick Dehne wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>>
>> > On Fri, Jun 12, 2009 at 10:32:50AM +0200, Patrick Dehne wrote:
>> >
>> > [...]
>> >> +/* 'buf' must be ID3v1_TAG_SIZE byte long */
>> >> +static int parse_tag(AVFormatContext *s, const uint8_t *buf)
>> >
>> > comment is not doxygen compatible
>>
>> fixed
> [...]
>> Index: libavformat/raw.c
>> ===================================================================
>> --- libavformat/raw.c (revision 19171)
>> +++ libavformat/raw.c (working copy)
>> @@ -27,6 +27,7 @@
>> #include "avformat.h"
>> #include "raw.h"
>> #include "id3v2.h"
>> +#include "id3v1.h"
>>
>> /* simple formats */
>>
>> @@ -625,6 +626,26 @@
>> else if(max_frames>=1) return 1;
>> else return 0;
>> }
>> +
>> +static int adts_aac_read_header(AVFormatContext *s,
>> + AVFormatParameters *ap)
>> +{
>> + AVStream *st;
>> +
>> + st = av_new_stream(s, 0);
>> + if (!st)
>> + return AVERROR(ENOMEM);
>> +
>> + st->codec->codec_type = CODEC_TYPE_AUDIO;
>> + st->codec->codec_id = s->iformat->value;
>> + st->need_parsing = AVSTREAM_PARSE_FULL;
>> +
>> + ff_id3v1_read(s);
>> + ff_id3v2_read(s);
>> +
>> + return 0;
>> +}
>> +
>> #endif
>>
>> /* Note: Do not forget to add new entries to the Makefile as well. */
>> @@ -635,7 +656,7 @@
>> NULL_IF_CONFIG_SMALL("raw ADTS AAC"),
>> 0,
>> adts_aac_probe,
>> - audio_read_header,
>> + adts_aac_read_header,
>> ff_raw_read_partial_packet,
>> .flags= AVFMT_GENERIC_INDEX,
>> .extensions = "aac",
>
> moving code and functional changes must be in seperate patches
>
> [...]
The attached patches split the previous patch into moving id3 reading
and adding id3 reading to the adts aac demuxer.
Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move_id3_reading.patch
Type: text/x-patch
Size: 6933 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090617/d2ba6e03/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_adtsaac_parse_id3v2.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090617/d2ba6e03/attachment-0001.bin>
More information about the ffmpeg-devel
mailing list