Index: gst/multipart/multipartdemux.c
===================================================================
--- gst/multipart/multipartdemux.c	(revision 590)
+++ gst/multipart/multipartdemux.c	(working copy)
@@ -70,14 +70,16 @@
   LAST_SIGNAL
 };
 
-#define DEFAULT_AUTOSCAN	FALSE
-#define DEFAULT_BOUNDARY	NULL
+#define DEFAULT_AUTOSCAN		FALSE
+#define DEFAULT_BOUNDARY		NULL
+#define DEFAULT_SINGLE_STREAM	FALSE
 
 enum
 {
   PROP_0,
   PROP_AUTOSCAN,
-  PROP_BOUNDARY
+  PROP_BOUNDARY,
+  PROP_SINGLE_STREAM
 };
 
 static GstStaticPadTemplate multipart_demux_src_template_factory =
@@ -169,6 +171,11 @@
           "Try to autofind the prefix (deprecated unused, see boundary)",
           DEFAULT_AUTOSCAN, G_PARAM_READWRITE));
 
+  g_object_class_install_property (gobject_class, PROP_SINGLE_STREAM,
+      g_param_spec_boolean ("single-stream", "Single Stream",
+          "Assume that there is only one stream whose content-type will not change and emit NO_MORE_PADS as soon as the first boundary content is parsed, decoded, and pads are linked",
+		  DEFAULT_SINGLE_STREAM, G_PARAM_READWRITE));
+
   /* populate gst names and mime types pairs */
   klass->gstnames = g_hash_table_new (g_str_hash, g_str_equal);
   for (i = 0; gstnames[i].key; i++) {
@@ -198,6 +205,7 @@
   multipart->header_completed = FALSE;
   multipart->scanpos = 0;
   multipart->autoscan = DEFAULT_AUTOSCAN;
+  multipart->singleStream = DEFAULT_SINGLE_STREAM;
 }
 
 void
@@ -328,6 +336,10 @@
       *created = TRUE;
     }
 
+    if (demux->singleStream) {
+        gst_element_no_more_pads(GST_ELEMENT_CAST (demux));
+    }
+    
     return mppad;
   }
 }
@@ -668,6 +680,9 @@
     case PROP_AUTOSCAN:
       filter->autoscan = g_value_get_boolean (value);
       break;
+    case PROP_SINGLE_STREAM:
+      filter->singleStream = g_value_get_boolean (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -690,6 +705,9 @@
     case PROP_AUTOSCAN:
       g_value_set_boolean (value, filter->autoscan);
       break;
+    case PROP_SINGLE_STREAM:
+      g_value_set_boolean (value, filter->singleStream);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
Index: gst/multipart/multipartdemux.h
===================================================================
--- gst/multipart/multipartdemux.h	(revision 590)
+++ gst/multipart/multipartdemux.h	(working copy)
@@ -84,6 +84,8 @@
 
   /* Index inside the current data when manually looking for the boundary */
   gint scanpos;
+
+  gboolean singleStream;
 };
 
 struct _GstMultipartDemuxClass
