GST_DEBUG_OBJECT (chain->ogg,
"creating new stream %08x in chain %p", serialno, chain);
- ret = g_object_new (GST_TYPE_OGG_PAD, NULL);
+ name = g_strdup_printf ("serial_%08x", serialno);
+ ret = g_object_new (GST_TYPE_OGG_PAD, "name", name, NULL);
+ g_free (name);
/* we own this one */
gst_object_ref (ret);
gst_object_sink (ret);
if (ogg_stream_init (&ret->map.stream, serialno) != 0)
goto init_failed;
- name = g_strdup_printf ("serial_%08x", serialno);
- gst_object_set_name (GST_OBJECT (ret), name);
- g_free (name);
-
/* FIXME: either do something with it or remove it */
list = gst_tag_list_new ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_SERIAL, serialno,