diff options
author | Alex Converse <alex.converse@gmail.com> | 2009-01-19 21:54:06 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2009-01-19 21:54:06 +0000 |
commit | ac3ef4a41b6de8bd0309fe166bb4c544f3d719be (patch) | |
tree | 709028defcbd2cfe5c1184fae3778d5a8c3512ae /libavformat/mpc.c | |
parent | 2f642393381659f4a198d9c5a96896eebb23de18 (diff) | |
download | ffmpeg-ac3ef4a41b6de8bd0309fe166bb4c544f3d719be.tar.gz |
Fix probing of files with ID3v2 tags. Discussed at
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-January/059302.html
Originally committed as revision 16688 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpc.c')
-rw-r--r-- | libavformat/mpc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mpc.c b/libavformat/mpc.c index 1a22c113b0..9dbd239f0e 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -21,6 +21,7 @@ #include "libavcodec/bitstream.h" #include "avformat.h" +#include "id3v2.h" #define MPC_FRAMESIZE 1152 #define DELAY_FRAMES 32 @@ -43,10 +44,12 @@ typedef struct { static int mpc_probe(AVProbeData *p) { const uint8_t *d = p->buf; + if (ff_id3v2_match(d)) { + d += ff_id3v2_tag_len(d); + } + if (d+3 < p->buf+p->buf_size) if (d[0] == 'M' && d[1] == 'P' && d[2] == '+' && (d[3] == 0x17 || d[3] == 0x7)) return AVPROBE_SCORE_MAX; - if (d[0] == 'I' && d[1] == 'D' && d[2] == '3') - return AVPROBE_SCORE_MAX / 2; return 0; } |