diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-08-11 15:02:25 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-08-11 15:11:01 -0400 |
commit | e531ea9ff0c5d92c338fbf7268be7c4b080c19a7 (patch) | |
tree | 1d1982d65042159bec0025afe7c9b011e75bd931 /gst | |
parent | 988643eb436db98b3232a8aec3da1dd5718a4e6a (diff) | |
download | gstreamer-plugins-bad-e531ea9ff0c5d92c338fbf7268be7c4b080c19a7.tar.gz |
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
Diffstat (limited to 'gst')
-rw-r--r-- | gst/frei0r/gstfrei0r.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c index 756172e9e..e55fb05b4 100644 --- a/gst/frei0r/gstfrei0r.c +++ b/gst/frei0r/gstfrei0r.c @@ -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; } |