tools: gst-launch: fix up caps printing in verbose mode

Add missing 'else' and print caps and taglists without the
annoying duplicate string escaping, making both nicer to read.

Fixes string leak and coverity CID 1358492.
This commit is contained in:
Tim-Philipp Müller 2016-04-13 16:40:43 +01:00
parent e0757e1d80
commit 939a7fee6c

View file

@ -863,7 +863,10 @@ event_loop (GstElement * pipeline, gboolean blocking, gboolean do_progress,
val_str = g_value_dup_string (val);
else if (G_VALUE_TYPE (val) == GST_TYPE_CAPS)
val_str = gst_caps_to_string (g_value_get_boxed (val));
val_str = gst_value_serialize (val);
else if (G_VALUE_TYPE (val) == GST_TYPE_TAG_LIST)
val_str = gst_tag_list_to_string (g_value_get_boxed (val));
else
val_str = gst_value_serialize (val);
} else {
val_str = g_strdup ("(no value)");
}