astdec: improve probing
authorPaul B Mahol <onemda@gmail.com>
Tue, 27 Nov 2012 10:12:28 +0000 (10:12 +0000)
committerPaul B Mahol <onemda@gmail.com>
Tue, 27 Nov 2012 10:16:30 +0000 (10:16 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/ast.c

index 4f83540..5f69f47 100644 (file)
 
 static int ast_probe(AVProbeData *p)
 {
-    if (AV_RL32(p->buf) == MKTAG('S', 'T', 'R', 'M'))
-        return AVPROBE_SCORE_MAX / 2;
+    if (AV_RL32(p->buf) == MKTAG('S','T','R','M') &&
+        AV_RB16(p->buf + 10) &&
+        AV_RB16(p->buf + 12) &&
+        AV_RB32(p->buf + 16))
+        return AVPROBE_SCORE_MAX / 3 * 2;
     return 0;
 }