mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
index: fix creation of writer id for unparented pads
Also do some cleanup in the impl.
This commit is contained in:
parent
3a744ca442
commit
af15626258
1 changed files with 10 additions and 7 deletions
|
@ -633,20 +633,23 @@ gst_index_gtype_resolver (GstIndex * index, GstObject * writer,
|
|||
g_return_val_if_fail (writer != NULL, FALSE);
|
||||
|
||||
if (GST_IS_PAD (writer)) {
|
||||
GstElement *element =
|
||||
(GstElement *) gst_object_get_parent (GST_OBJECT (writer));
|
||||
GstObject *element = gst_object_get_parent (GST_OBJECT (writer));
|
||||
gchar *name;
|
||||
|
||||
name = gst_object_get_name (writer);
|
||||
*writer_string = g_strdup_printf ("%s.%s",
|
||||
g_type_name (G_OBJECT_TYPE (element)), name);
|
||||
if (element) {
|
||||
*writer_string = g_strdup_printf ("%s.%s",
|
||||
G_OBJECT_TYPE_NAME (element), name);
|
||||
gst_object_unref (element);
|
||||
} else {
|
||||
*writer_string = name;
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
gst_object_unref (element);
|
||||
g_free (name);
|
||||
|
||||
} else {
|
||||
*writer_string =
|
||||
g_strdup_printf ("%s", g_type_name (G_OBJECT_TYPE (writer)));
|
||||
*writer_string = g_strdup (G_OBJECT_TYPE_NAME (writer));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue