From ad5dda4de582558f8db09600a68fd15da123fa89 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 22 Jun 2005 10:54:32 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ gst/gstvalue.c | 2 +- gst/parse/grammar.y | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96285ff683..22e06996f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-22 Thomas Vander Stichele + + * 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 * gst/gstformat.c: diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 8d51800164..aac875d453 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.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; diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y index ec28c73e7f..a0216b2bc8 100644 --- a/gst/parse/grammar.y +++ b/gst/parse/grammar.y @@ -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);