mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
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:
parent
d2bd939899
commit
59fddc9237
2 changed files with 5 additions and 5 deletions
|
@ -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:{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue