value: fix parsing of explicit value casts
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 17 Mar 2021 13:06:51 +0000 (14:06 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Wed, 17 Mar 2021 13:11:39 +0000 (14:11 +0100)
commit12661d90a3a4202c579e184b95316fedd895fa71
treebe9c8546aff9f261cbd3904ff36d664245d2950f
parent44bdad58f623e50a07476c0f40f8ff7543396f7c
value: fix parsing of explicit value casts

Since acdb4ce03d525a18f6c351a040b8446c7bbd98bd , parsing of the
value for a property can use the pspec to determine what type
a value should be casted to.

However, this broke the case where the value is explicitly casted
to a type (eg <(float) 0.0>). In that situation, we want to respect
the casting decision, and only use the pspec to perform "implicit"
casts.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/881

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