Index: gst/typefind/gsttypefindfunctions.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/typefind/gsttypefindfunctions.c,v
retrieving revision 1.116
diff -u -u -r1.116 gsttypefindfunctions.c
--- gst/typefind/gsttypefindfunctions.c	3 Aug 2006 11:15:53 -0000	1.116
+++ gst/typefind/gsttypefindfunctions.c	8 Aug 2006 08:04:58 -0000
@@ -934,7 +934,7 @@
 #define MULTIPART_CAPS gst_static_caps_get(&multipart_caps)
 
 /* multipart/x-mixed replace is: 
- *   --<some ascii chars>[\r]\n
+ *   <maybe some whitespace>--<some ascii chars>[\r]\n
  *   <more ascii chars>[\r]\nContent-type:<more ascii>[\r]\n */
 static void
 multipart_type_find (GstTypeFind * tf, gpointer unused)
@@ -942,8 +942,16 @@
   guint8 *data;
   guint8 *x;
 
-  data = gst_type_find_peek (tf, 0, 2);
-  if (!data || data[0] != '-' || data[1] != '-')
+#define MULTIPART_MAX_BOUNDARY_OFFSET 16
+  data = gst_type_find_peek (tf, 0, MULTIPART_MAX_BOUNDARY_OFFSET);
+  if (!data) 
+    return;
+  
+  for (x = data ; 
+       x - data < MULTIPART_MAX_BOUNDARY_OFFSET - 2 && g_ascii_isspace(*x); 
+       x++)
+    ;
+  if (x[0] != '-' || x[1] != '-')
     return;
 
   /* Could be okay, peek what should be enough for a complete header */
