tools: gst-launch: fix up caps printing in verbose mode
authorTim-Philipp Müller <tim@centricular.com>
Wed, 13 Apr 2016 15:40:43 +0000 (16:40 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 13 Apr 2016 15:42:31 +0000 (16:42 +0100)
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.

tools/gst-launch.c

index ac10601..2de754d 100644 (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)");
         }