typefind: recognize Asylum modules
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 9 Sep 2011 11:07:44 +0000 (12:07 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 9 Sep 2011 11:54:45 +0000 (13:54 +0200)
Note that there is already a AMF detection for a different
magic, I'm not sure if that's a different format with the
same initials or not. AMF is used for a few different formats
(including video), so...

This fixes playbin2 playing Asylum modules.

https://bugzilla.gnome.org/show_bug.cgi?id=658514

gst/typefind/gsttypefindfunctions.c

index 5d3d95c..62d3984 100644 (file)
@@ -2888,6 +2888,13 @@ mod_type_find (GstTypeFind * tf, gpointer unused)
       return;
     }
   }
+  /* AMF */
+  if ((data = gst_type_find_peek (tf, 0, 19)) != NULL) {
+    if (memcmp (data, "ASYLUM Music Format", 19) == 0) {
+      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MOD_CAPS);
+      return;
+    }
+  }
 }
 
 /*** application/x-shockwave-flash ***/