optimisation : Use g_object_newv where possible.
[platform/upstream/gstreamer.git] / gst / gstelementfactory.c
index 8c47a5a..0cdb5ff 100644 (file)
@@ -281,7 +281,8 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank,
   }
 
   factory =
-      GST_ELEMENT_FACTORY_CAST (g_object_new (GST_TYPE_ELEMENT_FACTORY, NULL));
+      GST_ELEMENT_FACTORY_CAST (g_object_newv (GST_TYPE_ELEMENT_FACTORY, 0,
+          NULL));
   gst_plugin_feature_set_name (GST_PLUGIN_FEATURE_CAST (factory), name);
   GST_LOG_OBJECT (factory, "Created new elementfactory for type %s",
       g_type_name (type));
@@ -405,7 +406,7 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
     goto no_type;
 
   /* create an instance of the element, cast so we don't assert on NULL */
-  element = GST_ELEMENT_CAST (g_object_new (factory->type, NULL));
+  element = GST_ELEMENT_CAST (g_object_newv (factory->type, 0, NULL));
   if (G_UNLIKELY (element == NULL))
     goto no_element;