changeset 5217:0d44bd284a96 libavformat

Improve SIFF probe by also checking the first tag is one of the expected.
author reimar
date Thu, 17 Sep 2009 18:09:20 +0000
parents 7c0b8cd87f5a
children ebbaf1c20a84
files siff.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/siff.c	Thu Sep 17 18:08:07 2009 +0000
+++ b/siff.c	Thu Sep 17 18:09:20 2009 +0000
@@ -60,11 +60,12 @@
 
 static int siff_probe(AVProbeData *p)
 {
+    uint32_t tag = AV_RL32(p->buf + 8);
     /* check file header */
-    if (AV_RL32(p->buf) == TAG_SIFF)
-        return AVPROBE_SCORE_MAX;
-    else
+    if (AV_RL32(p->buf) != TAG_SIFF ||
+        (tag != TAG_VBV1 && tag != TAG_SOUN))
         return 0;
+    return AVPROBE_SCORE_MAX;
 }
 
 static int create_audio_stream(AVFormatContext *s, SIFFContext *c)