diff options
author | Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de> | 2010-06-11 13:44:57 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-06-11 13:44:57 +0000 |
commit | 3a1350e8d9955a5eb9ec90f9b3e27ae63c3fb0bb (patch) | |
tree | 0c5f4ce531628c132328144c7d0e1ed76b642393 /libavformat/id3v2.h | |
parent | 1c1697117dbd2923d5876c10a1ebaeec233338b5 (diff) | |
download | ffmpeg-3a1350e8d9955a5eb9ec90f9b3e27ae63c3fb0bb.tar.gz |
Generalize ID3v2 functions to support ID3v2-like ID headers with a
different magic in the header (mainly targeted to Sony's .oma/.aa3
format).
Patch by Michael Karcher, ffmpeg A mkarcher dialup fu-berlin de
Originally committed as revision 23583 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/id3v2.h')
-rw-r--r-- | libavformat/id3v2.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h index 70030d297f..1f1530467e 100644 --- a/libavformat/id3v2.h +++ b/libavformat/id3v2.h @@ -29,10 +29,17 @@ #define ID3v2_HEADER_SIZE 10 /** + * Default magic bytes for ID3v2 header: "ID3" + */ +#define ID3v2_DEFAULT_MAGIC "ID3" + +/** * Detects ID3v2 Header. - * @buf must be ID3v2_HEADER_SIZE byte long + * @buf must be ID3v2_HEADER_SIZE byte long + * @magic magic bytes to identify the header, machine byte order. + * If in doubt, use ID3v2_DEFAULT_MAGIC. */ -int ff_id3v2_match(const uint8_t *buf); +int ff_id3v2_match(const uint8_t *buf, const char *magic); /** * Gets the length of an ID3v2 tag. @@ -50,7 +57,7 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags) /** * Read an ID3v2 tag */ -void ff_id3v2_read(AVFormatContext *s); +void ff_id3v2_read(AVFormatContext *s, const char *magic); extern const AVMetadataConv ff_id3v2_metadata_conv[]; |