mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-12 17:25:36 +00:00
gst/gstvalue.c: fix for #308599 - fixes deserializing gint64 types
Original commit message from CVS: * gst/gstvalue.c: fix for #308599 - fixes deserializing gint64 types * gst/parse/grammar.y: add a log line to show what type we deserialize to
This commit is contained in:
parent
86ae3a8c77
commit
ad5dda4de5
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-06-22 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstvalue.c:
|
||||
fix for #308599 - fixes deserializing gint64 types
|
||||
* gst/parse/grammar.y:
|
||||
add a log line to show what type we deserialize to
|
||||
|
||||
2005-06-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/gstformat.c:
|
||||
|
|
|
@ -979,7 +979,7 @@ gst_value_deserialize_boolean (GValue * dest, const char *s)
|
|||
* int *
|
||||
*******/
|
||||
|
||||
static int
|
||||
static long long
|
||||
gst_strtoll (const char *s, char **end, int base)
|
||||
{
|
||||
long long i;
|
||||
|
|
|
@ -239,6 +239,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
GValue v = { 0, };
|
||||
GValue v2 = { 0, };
|
||||
GstObject *target;
|
||||
GType value_type;
|
||||
|
||||
/* parse the string, so the property name is null-terminated an pos points
|
||||
to the beginning of the value */
|
||||
while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++;
|
||||
|
@ -257,7 +259,10 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
}
|
||||
gst_parse_unescape (pos);
|
||||
if (gst_child_proxy_lookup (GST_OBJECT (element), value, &target, &pspec)) {
|
||||
g_value_init (&v, G_PARAM_SPEC_VALUE_TYPE(pspec));
|
||||
value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
|
||||
GST_LOG ("parsing property %s as a %s", pspec->name,
|
||||
g_type_name (value_type));
|
||||
g_value_init (&v, value_type);
|
||||
if (!gst_value_deserialize (&v, pos))
|
||||
goto error;
|
||||
g_object_set_property (G_OBJECT (target), pspec->name, &v);
|
||||
|
|
Loading…
Reference in a new issue