[FFmpeg-devel] [PATCH] [1/2] move id3v2 parsing code from mp3.c to the id3v2.h and id3v2.c, take 2
Patrick Dehne
patrick
Wed Jun 10 15:54:02 CEST 2009
Michael Niedermayer <michaelni at gmx.at> writes:
> On Tue, Jun 09, 2009 at 11:57:24PM +0200, Patrick Dehne wrote:
>> id3v2.c | 146 ++++++++++++++++++++++++++++++++
>> id3v2.h | 143 ++++++++++++++++++++++++++++++++
>> mp3.c | 284 ----------------------------------------------------------------
>> 3 files changed, 289 insertions(+), 284 deletions(-)
>> 5da35d281da6c56aa9dc5ec6b91f1e6b484841cf 1_adtsaac_parse_id3v2.patch
>> Index: libavformat/id3v2.c
>> ===================================================================
>> --- libavformat/id3v2.c (revision 19140)
>> +++ libavformat/id3v2.c (working copy)
>> @@ -20,6 +20,7 @@
>> */
>>
>> #include "id3v2.h"
>> +#include "libavutil/avstring.h"
>>
>> int ff_id3v2_match(const uint8_t *buf)
>> {
>> @@ -45,3 +46,148 @@
>> len += ID3v2_HEADER_SIZE;
>> return len;
>> }
>> +
>> +static unsigned int id3v2_get_size(ByteIOContext *s, int len)
>
> the id3v2 prefix is redundant for static functions in a file named
> id3v2
fixed
> [...]
>> Index: libavformat/id3v2.h
>> ===================================================================
>> --- libavformat/id3v2.h (revision 19140)
>> +++ libavformat/id3v2.h (working copy)
>> @@ -23,10 +23,147 @@
>> #define AVFORMAT_ID3V2_H
>>
>> #include <stdint.h>
>> +#include "avformat.h"
>>
>> #define ID3v2_HEADER_SIZE 10
>>
>> +#define ID3v1_TAG_SIZE 128
>> +
>> +#define ID3v1_GENRE_MAX 125
>
> ID3v1 does not belong in a file named id3v2
fixed
>> /**
>> + * ID3v1 genres
>> + */
>> +static const char * const id3v1_genre_str[ID3v1_GENRE_MAX + 1] = {
>
> tables dont belong in headers that are possibly included from
> multipe places
fixed
> [...]
>> @@ -39,4 +176,10 @@
>> */
>> int ff_id3v2_tag_len(const uint8_t *buf);
>>
>> +/**
>> + * ID3v2 parser
>> + * Handles ID3v2.2, 2.3 and 2.4.
>> + */
>> +void id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags);
>
> needs ff prefix
fixed
Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_adtsaac_parse_id3v2.patch
Type: text/x-patch
Size: 18621 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090610/dbb96e22/attachment.bin>
More information about the ffmpeg-devel
mailing list