From 59fddc9237e7c45d88286491d644c486def52e19 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Tue, 11 May 2010 13:52:51 -0400 Subject: [PATCH] frei0r: Fix setting of boolean values Setting boolean type parameters from gst-launch failed because of improper handling of type conversions. Fixes bug #618388. --- gst/frei0r/gstfrei0r.c | 4 ++-- gst/frei0r/gstfrei0r.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c index 43e2326f02..82ff06f58c 100644 --- a/gst/frei0r/gstfrei0r.c +++ b/gst/frei0r/gstfrei0r.c @@ -287,7 +287,7 @@ gst_frei0r_get_property (f0r_instance_t * instance, GstFrei0rFuncTable * ftable, if (instance) ftable->get_param_value (instance, &d, prop->prop_idx); else - d = property_cache[prop->prop_idx].data.b ? 1.0 : 0.0; + d = property_cache[prop->prop_idx].data.b; g_value_set_boolean (value, (d < 0.5) ? FALSE : TRUE); break; @@ -387,7 +387,7 @@ gst_frei0r_set_property (f0r_instance_t * instance, GstFrei0rFuncTable * ftable, if (instance) ftable->set_param_value (instance, &d, prop->prop_idx); - property_cache[prop->prop_idx].data.b = b; + property_cache[prop->prop_idx].data.b = d; break; } case F0R_PARAM_DOUBLE:{ diff --git a/gst/frei0r/gstfrei0r.h b/gst/frei0r/gstfrei0r.h index 91e5e09789..da24b43180 100644 --- a/gst/frei0r/gstfrei0r.h +++ b/gst/frei0r/gstfrei0r.h @@ -32,9 +32,9 @@ typedef struct _GstFrei0rPropertyValue GstFrei0rPropertyValue; struct _GstFrei0rPropertyValue { union { - gboolean b; - gdouble d; - gchar *s; + f0r_param_bool b; + f0r_param_double d; + f0r_param_string *s; f0r_param_position_t position; f0r_param_color_t color; } data;