mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
tools: device-monitor: Print string property as-is without serialize
gst_value_serialize() does more than what's needed to printf-ing especially when given GValue is already string. Just print string value as-is without gst_value_serialize() to avoid unreadable string print, especially for multi-bytes character encoding cases. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2416>
This commit is contained in:
parent
08d3edb990
commit
5a6a6ae871
1 changed files with 2 additions and 0 deletions
|
@ -144,6 +144,8 @@ print_structure_field (GQuark field_id, const GValue * value,
|
||||||
if (G_VALUE_HOLDS_UINT (value)) {
|
if (G_VALUE_HOLDS_UINT (value)) {
|
||||||
val = g_strdup_printf ("%u (0x%08x)", g_value_get_uint (value),
|
val = g_strdup_printf ("%u (0x%08x)", g_value_get_uint (value),
|
||||||
g_value_get_uint (value));
|
g_value_get_uint (value));
|
||||||
|
} else if (G_VALUE_HOLDS_STRING (value)) {
|
||||||
|
val = g_value_dup_string (value);
|
||||||
} else {
|
} else {
|
||||||
val = gst_value_serialize (value);
|
val = gst_value_serialize (value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue