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/flacdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/flacdec.c') diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index 2ceef964e8..3cdd53c6af 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -43,7 +43,7 @@ static int flac_read_header(AVFormatContext *s, /* skip ID3v2 header if found */ 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)) { int len = ff_id3v2_tag_len(buf); url_fseek(s->pb, len - ID3v2_HEADER_SIZE, SEEK_CUR); } else { @@ -130,7 +130,7 @@ static int flac_probe(AVProbeData *p) uint8_t *bufptr = p->buf; uint8_t *end = p->buf + p->buf_size; - if(ff_id3v2_match(bufptr)) + if(ff_id3v2_match(bufptr, ID3v2_DEFAULT_MAGIC)) bufptr += ff_id3v2_tag_len(bufptr); if(bufptr > end-4 || memcmp(bufptr, "fLaC", 4)) return 0; -- cgit v1.2.3