[FFmpeg-devel] [PATCH] slightly improve SIFF probe function

Reimar Döffinger Reimar.Doeffinger
Tue Sep 15 11:05:33 CEST 2009


Very minor improvement, but enough to fool probetest
Index: libavformat/siff.c
===================================================================
--- libavformat/siff.c  (revision 19849)
+++ libavformat/siff.c  (working copy)
@@ -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)




More information about the ffmpeg-devel mailing list