From 3a1350e8d9955a5eb9ec90f9b3e27ae63c3fb0bb Mon Sep 17 00:00:00 2001 From: Michael Karcher Date: Fri, 11 Jun 2010 13:44:57 +0000 Subject: 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 --- libavformat/mpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat/mpc.c') diff --git a/libavformat/mpc.c b/libavformat/mpc.c index 4dda65dbca..681e37f772 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -45,7 +45,7 @@ typedef struct { static int mpc_probe(AVProbeData *p) { const uint8_t *d = p->buf; - if (ff_id3v2_match(d)) { + if (ff_id3v2_match(d, ID3v2_DEFAULT_MAGIC)) { d += ff_id3v2_tag_len(d); } if (d+3 < p->buf+p->buf_size) @@ -67,7 +67,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) if (url_fseek(s->pb, pos, SEEK_SET) < 0) return -1; ret = get_buffer(s->pb, buf, ID3v2_HEADER_SIZE); - if (ret != ID3v2_HEADER_SIZE || !ff_id3v2_match(buf)) { + if (ret != ID3v2_HEADER_SIZE || !ff_id3v2_match(buf, ID3v2_DEFAULT_MAGIC)) { av_log(s, AV_LOG_ERROR, "Not a Musepack file\n"); return -1; } @@ -82,7 +82,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) /* read ID3 tags */ if (url_fseek(s->pb, pos, SEEK_SET) < 0) return -1; - ff_id3v2_read(s); + ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC); get_le24(s->pb); } c->ver = get_byte(s->pb); -- cgit v1.2.3