From 133a0b17715b2b7f106bed7ea0164451e9c33e94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Stadler?= Date: Fri, 21 Oct 2011 21:41:03 +0200 Subject: [PATCH] oggdemux: remove avoidable call to gst_object_set_name --- ext/ogg/gstoggdemux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 3a880d48d5..f739df09a7 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1692,7 +1692,9 @@ gst_ogg_chain_new_stream (GstOggChain * chain, guint32 serialno) 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); @@ -1707,10 +1709,6 @@ gst_ogg_chain_new_stream (GstOggChain * chain, guint32 serialno) 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, -- 2.34.1