Properly detects shn files with no seek tables at the end
authorChristophe Fergeau <teuf@gnome.org>
Sun, 23 Nov 2003 00:33:15 +0000 (00:33 +0000)
committerChristophe Fergeau <teuf@gnome.org>
Sun, 23 Nov 2003 00:33:15 +0000 (00:33 +0000)
Original commit message from CVS:
Properly detects shn files with no seek tables at the end

gst/typefind/gsttypefindfunctions.c

index 0864997..1b70cf3 100644 (file)
@@ -628,8 +628,11 @@ aiff_type_find (GstTypeFind *tf, gpointer unused)
 static void
 shn_type_find (GstTypeFind *tf, gpointer unused)
 {
-  guint8 *data = gst_type_find_peek (tf, -8, 8);
-
+  guint8 *data = gst_type_find_peek (tf, 0, 4);
+  if (data && memcmp (data, "ajkg", 4) == 0) {
+    gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SHN_CAPS);
+  }
+  data = gst_type_find_peek (tf, -8, 8);
   if (data && memcmp (data, "SHNAMPSK", 8) == 0) {
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SHN_CAPS);
   }