summaryrefslogtreecommitdiff
path: root/libavformat/mpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpc.c')
-rw-r--r--libavformat/mpc.c7
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;
}