Index: gst/subparse/gstsubparse.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/subparse/gstsubparse.c,v
retrieving revision 1.30
diff -u -r1.30 gstsubparse.c
--- gst/subparse/gstsubparse.c	15 May 2006 09:14:35 -0000	1.30
+++ gst/subparse/gstsubparse.c	15 May 2006 14:28:31 -0000
@@ -626,7 +626,7 @@
     GST_LOG ("MPSub (time based) format detected");
     return GST_SUB_PARSE_FORMAT_MPSUB;
   }
-  if (!g_ascii_strncasecmp (match_str, "<SAMI>", 6)) {
+  if (check_sami_format (match_str)) {
     GST_LOG ("SAMI (time based) format detected");
     return GST_SUB_PARSE_FORMAT_SAMI;
   }
Index: gst/subparse/samiparse.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/subparse/samiparse.c,v
retrieving revision 1.2
diff -u -r1.2 samiparse.c
--- gst/subparse/samiparse.c	15 May 2006 09:41:03 -0000	1.2
+++ gst/subparse/samiparse.c	15 May 2006 14:28:31 -0000
@@ -371,6 +371,12 @@
   return NULL;
 }
 
+gchar *
+check_sami_format (gchar * match_str)
+{
+  return (gchar *) xmlStrcasestr ((const xmlChar *) match_str,
+      (xmlChar *) "<SAMI>");
+}
 #else /* GST_DISABLE_LOADSAVE_REGISTRY */
 
 gchar *
@@ -398,4 +404,9 @@
   return;
 }
 
+gchar *
+check_sami_format (gchar * match_str)
+{
+  return NULL;
+}
 #endif /* GST_DISABLE_LOADSAVE_REGISTRY */
Index: gst/subparse/samiparse.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/subparse/samiparse.h,v
retrieving revision 1.1
diff -u -r1.1 samiparse.h
--- gst/subparse/samiparse.h	15 May 2006 09:14:35 -0000	1.1
+++ gst/subparse/samiparse.h	15 May 2006 14:28:31 -0000
@@ -32,6 +32,8 @@
 
 void    sami_context_reset  (ParserState * state);
 
+gchar * check_sami_format   (gchar * match_str);
+
 G_END_DECLS
 
 #endif /* _SAMI_PARSE_H_ */
