don't convert NULL structures to strings

Original commit message from CVS:
don't convert NULL structures to strings
This commit is contained in:
Thomas Vander Stichele 2005-08-15 18:15:38 +00:00
parent cdc8ba9725
commit b27244a943
3 changed files with 18 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2005-08-15 Thomas Vander Stichele <thomas at apestaart dot org>
* tools/gst-launch.c: (event_loop):
don't convert NULL structures to strings
2005-08-15 Stefan Kost <ensonic@users.sf.net>
* docs/gst/gstreamer-sections.txt:

View file

@ -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;
}

View file

@ -376,15 +376,19 @@ 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);
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 (_("Got Message from element \"%s\": %s\n"),
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))), sstr);
g_print ("%s\n", sstr);
g_free (sstr);
}
}
switch (revent) {
case GST_MESSAGE_EOS: