typefinding: Mark ISO 14496-14 files as video/quicktime
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 6 Jun 2010 07:01:35 +0000 (12:31 +0530)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 24 Jun 2010 13:25:38 +0000 (14:25 +0100)
These are currently being marked as audio/x-m4a which is incorrect.

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

gst/typefind/gsttypefindfunctions.c

index 980f804..07d8747 100644 (file)
@@ -2311,9 +2311,7 @@ m4a_type_find (GstTypeFind * tf, gpointer unused)
 {
   guint8 *data = gst_type_find_peek (tf, 4, 8);
 
-  if (data &&
-      (memcmp (data, "ftypM4A ", 8) == 0 ||
-          memcmp (data, "ftypmp42", 8) == 0)) {
+  if (data && (memcmp (data, "ftypM4A ", 8) == 0)) {
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, M4A_CAPS);
   }
 }
@@ -2411,6 +2409,7 @@ static GstStaticCaps qt_caps = GST_STATIC_CAPS ("video/quicktime");
 #define QT_CAPS gst_static_caps_get(&qt_caps)
 #define STRNCMP(x,y,z) (strncmp ((char*)(x), (char*)(y), z))
 
+/* FIXME 0.11: go through http://www.ftyps.com/ */
 static void
 qt_type_find (GstTypeFind * tf, gpointer unused)
 {
@@ -2428,7 +2427,8 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
       break;
     }
 
-    if (STRNCMP (&data[4], "ftypisom", 8) == 0) {
+    if (STRNCMP (&data[4], "ftypisom", 8) == 0 ||
+        STRNCMP (&data[4], "ftypmp42", 8) == 0) {
       tip = GST_TYPE_FIND_MAXIMUM;
       variant = "iso";
       break;