diff options
author | Joshua M. Doe <joshua.doe@us.army.mil> | 2010-05-11 13:52:51 -0400 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-05-12 18:18:46 +0200 |
commit | 59fddc9237e7c45d88286491d644c486def52e19 (patch) | |
tree | 939ee15f998c9b67a907ca7d4e958736c7b02861 | |
parent | d2bd9398995f6b0c0cf7b5d3522294d47ee3d1cb (diff) |
frei0r: Fix setting of boolean values
Setting boolean type parameters from gst-launch failed because of improper handling of type conversions.
Fixes bug #618388.
-rw-r--r-- | gst/frei0r/gstfrei0r.c | 4 | ||||
-rw-r--r-- | 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 43e2326f0..82ff06f58 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 91e5e0978..da24b4318 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; |