summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/tta.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index e6ded521ba..656f914a5d 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -33,9 +33,11 @@ typedef struct {
static int tta_probe(AVProbeData *p)
{
- const uint8_t *d = p->buf;
-
- if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
+ if (AV_RL32(&p->buf[0]) == MKTAG('T', 'T', 'A', '1') &&
+ (AV_RL16(&p->buf[4]) == 1 || AV_RL16(&p->buf[4]) == 2) &&
+ AV_RL16(&p->buf[6]) > 0 &&
+ AV_RL16(&p->buf[8]) > 0 &&
+ AV_RL32(&p->buf[10]) > 0)
return AVPROBE_SCORE_EXTENSION + 30;
return 0;
}