aggregator: Ensure that the source pad is created as a GstAggregatorPad if no type...
[platform/upstream/gstreamer.git] / gst / gsttypefind.c
index 1fcbea1..5c2b0d1 100644 (file)
@@ -21,6 +21,7 @@
 
 /**
  * SECTION:gsttypefind
+ * @title: GstTypefind
  * @short_description: Stream type detection
  *
  * The following functions allow you to detect the media type of an unknown
@@ -70,17 +71,12 @@ gst_type_find_register (GstPlugin * plugin, const gchar * name, guint rank,
 
   GST_INFO ("registering typefind function for %s", name);
 
-  factory = g_object_newv (GST_TYPE_TYPE_FIND_FACTORY, 0, NULL);
+  factory = g_object_new (GST_TYPE_TYPE_FIND_FACTORY, NULL);
   GST_DEBUG_OBJECT (factory, "using new typefind factory for %s", name);
-  g_assert (GST_IS_TYPE_FIND_FACTORY (factory));
 
   gst_plugin_feature_set_name (GST_PLUGIN_FEATURE_CAST (factory), name);
   gst_plugin_feature_set_rank (GST_PLUGIN_FEATURE_CAST (factory), rank);
 
-  if (factory->extensions) {
-    g_strfreev (factory->extensions);
-    factory->extensions = NULL;
-  }
   if (extensions)
     factory->extensions = g_strsplit (extensions, ",", -1);
 
@@ -119,8 +115,8 @@ gst_type_find_register (GstPlugin * plugin, const gchar * name, guint rank,
  * the stream. The returned memory is valid until the typefinding function
  * returns and must not be freed.
  *
- * Returns: (transfer none) (array length=size): the requested data, or %NULL
- *     if that data is not available.
+ * Returns: (transfer none) (array length=size) (nullable): the
+ *     requested data, or %NULL if that data is not available.
  */
 const guint8 *
 gst_type_find_peek (GstTypeFind * find, gint64 offset, guint size)