From 0dafe6e63971ea89a9a9ff9cf30f5a076f915259 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 7 Sep 2019 04:36:18 +0200 Subject: [PATCH] gstvalue: use value_nick for serialization not value_name . This was causing incorrect launch lines to be displayed by gst-device-monitor, and the deserialization code below works with nicks. --- gst/gstvalue.c | 2 +- tests/check/gst/gstvalue.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 8835dce..4b396cd 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -3754,7 +3754,7 @@ gst_value_serialize_enum (const GValue * value) } g_return_val_if_fail (en, NULL); - return g_strdup (en->value_name); + return g_strdup (en->value_nick); } static gint diff --git a/tests/check/gst/gstvalue.c b/tests/check/gst/gstvalue.c index 841a4c8..4c898c7 100644 --- a/tests/check/gst/gstvalue.c +++ b/tests/check/gst/gstvalue.c @@ -2668,9 +2668,9 @@ GST_START_TEST (test_serialize_deserialize_format_enum) str = gst_structure_to_string (s); GST_LOG ("Got structure string '%s'", GST_STR_NULL (str)); fail_unless (str != NULL); - fail_unless (strstr (str, "TIME") != NULL); - fail_unless (strstr (str, "BYTE") != NULL); - fail_unless (strstr (str, "DEFAULT") != NULL); + fail_unless (strstr (str, "time") != NULL); + fail_unless (strstr (str, "byte") != NULL); + fail_unless (strstr (str, "default") != NULL); fail_unless (strstr (str, "FOOBAR") != NULL); s2 = gst_structure_from_string (str, &end); -- 2.7.4