From 690a20a54d93302dbdf69276cb18c6112e3bbf74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 9 Aug 2012 19:15:29 +0100 Subject: [PATCH] gstobject: fix double string escaping in gst_object_default_deep_notify() Make output of gst-launch -v readable again. last-message = "event\ \ \ \*\*\*\*\*\*\*\ \(fakesink0:sink\)\ E\ \(type:\ tag\ \(20510\)\,\ GstTagList-stream\,\ taglist\=\(taglist\)\"taglist\\\,\\\ video-codec\\\=\\\(string\\\)H264\\\,\\\ minimum-bitrate\\\=\\\(uint\\\)636611\\\,\\\ bitrate\\\=\\\(uint\\\)980729\\\,\\\ maximum-bitrate\\\=\\\(uint\\\)1116707\\\;\"\;\)\ 0x15bc760" vs. last-message = event ******* (fakesink0:sink) E (type: tag (20510), GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)H264\,\ minimum-bitrate\=\(uint\)856039\,\ bitrate \=\(uint\)1019748\,\ maximum-bitrate\=\(uint\)1116707\;";) 0x11149e0 --- gst/gstobject.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/gstobject.c b/gst/gstobject.c index eedd108d73..d7df430d84 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -507,7 +507,10 @@ gst_object_default_deep_notify (GObject * object, GstObject * orig, g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (orig), pspec->name, &value); - str = gst_value_serialize (&value); + if (G_VALUE_HOLDS_STRING (&value)) + str = g_value_dup_string (&value); + else + str = gst_value_serialize (&value); name = gst_object_get_path_string (orig); g_print ("%s: %s = %s\n", name, pspec->name, str); g_free (name);