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/mpc.c | |
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/mpc.c')
-rw-r--r-- | libavformat/mpc.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |