From ab8674d503390e2574a0e1494da987d5432816dd Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 17 Apr 2020 07:44:55 +0200 Subject: [PATCH] gstregistrychunks: Directly set name on features --- gst/gstregistrychunks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/gstregistrychunks.c b/gst/gstregistrychunks.c index c5d4197f78..6eb7c645e5 100644 --- a/gst/gstregistrychunks.c +++ b/gst/gstregistrychunks.c @@ -588,11 +588,11 @@ gst_registry_chunks_load_feature (GstRegistry * registry, gchar ** in, plugin_name); return FALSE; } - if (G_UNLIKELY ((feature = g_object_new (type, NULL)) == NULL)) { + if (G_UNLIKELY ((feature = + g_object_new (type, "name", feature_name, NULL)) == NULL)) { GST_ERROR ("Can't create feature from type"); return FALSE; } - gst_plugin_feature_set_name (feature, feature_name); if (G_UNLIKELY (!GST_IS_PLUGIN_FEATURE (feature))) { GST_ERROR ("typename : '%s' is not a plugin feature", type_name);