structure: don't unescape values before deserializing
authorHenry Wilkes <hwilkes@igalia.com>
Fri, 18 Oct 2019 12:00:33 +0000 (13:00 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 19 Jan 2021 13:25:07 +0000 (13:25 +0000)
commit7f267395a63b950c554548de5cec7eb4327bb7a1
treee74bfff76e39cd91b46f2b91623f48764d983934
parentf0d003205cb21d5285bee596ffe1d7a90d326e7e
structure: don't unescape values before deserializing

No longer call _priv_gst_value_parse_string with unescape set to TRUE
before passing a value to gst_value_deserialize in
_priv_gst_value_parse_value. This latter function is called by
gst_structure_from_string and gst_caps_from_string.

When gst_structure_to_string and gst_caps_to_string are called, no
escaping is performed after calling gst_value_serialize. Therefore, by
unescaping the value string, we were introducing an additional operation
that was not performed by the original *_to_string functions. In
particular, this has meant that the derialization functions for many
non-basic types are incomplete reverses of the corresponding
serialization function (i.e., if you pipe the output of the
serialization function into the deserialization function it could fail)
because they have to compensate for this additional escaping operation,
when really this should be the domain of the deserialization functions
instead.

Correspondingly changed a few deserialization functions.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/452

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/303>
gst/gstvalue.c
tests/check/gst/gstvalue.c