commit 72f3587f04068ee224f21ca5c90f76d9c7829a5f
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Aug 26 09:08:53 2009 +0200

    riff: Add support for AVF files
    
    AVF is valid RIFF but has AVF0 has first fourcc instead of RIFF.
    
    Fixes bug #593117.

diff --git a/gst-libs/gst/riff/riff-ids.h b/gst-libs/gst/riff/riff-ids.h
index b9526d6..e973b61 100644
--- a/gst-libs/gst/riff/riff-ids.h
+++ b/gst-libs/gst/riff/riff-ids.h
@@ -33,6 +33,7 @@ G_BEGIN_DECLS
 
 /* tags */
 #define GST_RIFF_TAG_RIFF GST_MAKE_FOURCC ('R','I','F','F')
+#define GST_RIFF_TAG_AVF0 GST_MAKE_FOURCC ('A','V','F','0')
 #define GST_RIFF_TAG_RIFX GST_MAKE_FOURCC ('R','I','F','X')
 #define GST_RIFF_TAG_LIST GST_MAKE_FOURCC ('L','I','S','T')
 #define GST_RIFF_TAG_avih GST_MAKE_FOURCC ('a','v','i','h')
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index 4a43f99..d4217f2 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -226,7 +226,7 @@ gst_riff_parse_file_header (GstElement * element,
 
   data = GST_BUFFER_DATA (buf);
   tag = GST_READ_UINT32_LE (data);
-  if (tag != GST_RIFF_TAG_RIFF)
+  if (tag != GST_RIFF_TAG_RIFF && tag != GST_RIFF_TAG_AVF0)
     goto not_riff;
 
   *doctype = GST_READ_UINT32_LE (data + 8);
