From b138134c9a28887f78bd3bfdec51c88e1a2e534b Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sun, 23 Nov 2003 00:33:15 +0000 Subject: [PATCH] Properly detects shn files with no seek tables at the end Original commit message from CVS: Properly detects shn files with no seek tables at the end --- gst/typefind/gsttypefindfunctions.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 086499720e..1b70cf309d 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -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); }