From e531ea9ff0c5d92c338fbf7268be7c4b080c19a7 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 11 Aug 2015 15:02:25 -0400 Subject: [PATCH] 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 --- gst/frei0r/gstfrei0r.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c index 756172e9e4..e55fb05b4d 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; }