From b27244a9437bf0679497b7960c7bc82ac465c1a5 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 15 Aug 2005 18:15:38 +0000 Subject: [PATCH] don't convert NULL structures to strings Original commit message from CVS: don't convert NULL structures to strings --- ChangeLog | 11 ++++++++--- gst/gstbus.c | 2 +- tools/gst-launch.c | 14 +++++++++----- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb69281..6f86ff6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2005-08-15 Thomas Vander Stichele + + * tools/gst-launch.c: (event_loop): + don't convert NULL structures to strings + 2005-08-15 Stefan Kost * docs/gst/gstreamer-sections.txt: - made some defines private + made some defines private * docs/gst/tmpl/gstconfig.sgml: * docs/gst/tmpl/gstqueue.sgml: * docs/gst/tmpl/gsttaglist.sgml: @@ -17,9 +22,9 @@ * gst/gstpad.c: (gst_pad_class_init): * gst/gstqueue.c: (gst_queue_class_init): * gst/gstxml.c: (gst_xml_class_init): - documented all undocumented signal inline + documented all undocumented signal inline * libs/gst/controller/gst-controller.h: - added padding + added padding 2005-08-15 Ronald S. Bultje diff --git a/gst/gstbus.c b/gst/gstbus.c index 9551fd5..b5da3ca 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -545,7 +545,7 @@ gst_bus_add_watch_full (GstBus * bus, gint priority, id = g_source_attach (source, NULL); g_source_unref (source); - GST_DEBUG_OBJECT (bus, "New source %p\n", source); + GST_DEBUG_OBJECT (bus, "New source %p", source); return id; } diff --git a/tools/gst-launch.c b/tools/gst-launch.c index b0fe2c8..b5891d2 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -376,14 +376,18 @@ event_loop (GstElement * pipeline, gboolean blocking) g_return_val_if_fail (message != NULL, TRUE); if (messages) { - gchar *sstr; const GstStructure *s; s = gst_message_get_structure (message); - sstr = gst_structure_to_string (s); - g_print (_("Got Message from element \"%s\": %s\n"), - GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))), sstr); - g_free (sstr); + g_print (_("Got Message from element \"%s\"\n"), + GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message)))); + if (s) { + gchar *sstr; + + sstr = gst_structure_to_string (s); + g_print ("%s\n", sstr); + g_free (sstr); + } } switch (revent) { -- 2.7.4