projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62d40fa
)
gstobject: avoid string creation when not needed
author
Edward Hervey
<bilboed@bilboed.com>
Mon, 6 Sep 2010 13:16:16 +0000
(15:16 +0200)
committer
Edward Hervey
<bilboed@bilboed.com>
Thu, 9 Sep 2010 16:40:08 +0000
(18:40 +0200)
gst/gstobject.c
patch
|
blob
|
history
diff --git
a/gst/gstobject.c
b/gst/gstobject.c
index
dabb894
..
02e7b45
100644
(file)
--- a/
gst/gstobject.c
+++ b/
gst/gstobject.c
@@
-516,15
+516,22
@@
gst_object_dispatch_properties_changed (GObject * object,
{
GstObject *gst_object, *parent, *old_parent;
guint i;
{
GstObject *gst_object, *parent, *old_parent;
guint i;
- gchar *name;
+#ifndef GST_DISABLE_GST_DEBUG
+ gchar *name = NULL;
const gchar *debug_name;
const gchar *debug_name;
+#endif
/* do the standard dispatching */
parent_class->dispatch_properties_changed (object, n_pspecs, pspecs);
gst_object = GST_OBJECT_CAST (object);
/* do the standard dispatching */
parent_class->dispatch_properties_changed (object, n_pspecs, pspecs);
gst_object = GST_OBJECT_CAST (object);
- name = gst_object_get_name (gst_object);
- debug_name = GST_STR_NULL (name);
+#ifndef GST_DISABLE_GST_DEBUG
+ if (G_UNLIKELY (__gst_debug_min >= GST_LEVEL_LOG)) {
+ name = gst_object_get_name (gst_object);
+ debug_name = GST_STR_NULL (name);
+ } else
+ debug_name = "";
+#endif
/* now let the parent dispatch those, too */
parent = gst_object_get_parent (gst_object);
/* now let the parent dispatch those, too */
parent = gst_object_get_parent (gst_object);
@@
-541,7
+548,9
@@
gst_object_dispatch_properties_changed (GObject * object,
parent = gst_object_get_parent (old_parent);
gst_object_unref (old_parent);
}
parent = gst_object_get_parent (old_parent);
gst_object_unref (old_parent);
}
+#ifndef GST_DISABLE_GST_DEBUG
g_free (name);
g_free (name);
+#endif
}
/**
}
/**