gst-plugins-base: oggdemux: remove avoidable call to gst_object_set_name

Stefan Sauer ensonic at hora-obscura.de
Wed Oct 26 02:28:36 PDT 2011


On 10/21/2011 10:25 PM, RenXX Stadler wrote:
> Module: gst-plugins-base
> Branch: master
> Commit: 133a0b17715b2b7f106bed7ea0164451e9c33e94
> URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=133a0b17715b2b7f106bed7ea0164451e9c33e94
>
> Author: René Stadler <rene.stadler at collabora.co.uk>
> Date:   Fri Oct 21 21:41:03 2011 +0200
>
> oggdemux: remove avoidable call to gst_object_set_name
>
> ---
>
>  ext/ogg/gstoggdemux.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
> index 3a880d4..f739df0 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);
what about gchar name[sizeof("serial_")+8] while you are on it

Stefan

>    /* 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,
>
>
>
> _______________________________________________
> gstreamer-commits mailing list
> gstreamer-commits at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111026/7ed8bd86/attachment.html>


More information about the gstreamer-devel mailing list