frei0r: Fix setting string parameters

String parameters are expected to be passed as (f0r_param_string *),
which actually map to char**. In the filters this is evaluated as
(*(char**)param) which currently lead to crash when passing char*.

Remove the special case for string, all types, including char* as
passed as a reference.

https://phabricator.freedesktop.org/T83
This commit is contained in:
Nicolas Dufresne 2015-08-11 15:02:25 -04:00
parent 988643eb43
commit e531ea9ff0

View file

@ -258,12 +258,8 @@ gst_frei0r_instance_construct (GstFrei0rFuncTable * ftable,
f0r_instance_t *instance = ftable->construct (width, height);
gint i;
for (i = 0; i < n_properties; i++) {
if (properties[i].info.type == F0R_PARAM_STRING)
ftable->set_param_value (instance, property_cache[i].data.s, i);
else
ftable->set_param_value (instance, &property_cache[i].data, i);
}
for (i = 0; i < n_properties; i++)
ftable->set_param_value (instance, &property_cache[i].data, i);
return instance;
}