frei0r: Fix setting of boolean values

Setting boolean type parameters from gst-launch failed because of improper handling of type conversions.

Fixes bug #618388.
This commit is contained in:
Joshua M. Doe 2010-05-11 13:52:51 -04:00 committed by Sebastian Dröge
parent d2bd939899
commit 59fddc9237
2 changed files with 5 additions and 5 deletions

View file

@ -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:{

View file

@ -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;