cvsmooth: Wrong assignment of prop leads to crash

when setting param2 property, it is wrongly being assigned to param1.
This leads to wrong behavior and a crash when param2 is set as 0.

https://bugzilla.gnome.org/show_bug.cgi?id=749523
This commit is contained in:
Vineeth T M 2015-05-18 14:01:59 +09:00 committed by Sebastian Dröge
parent 8df641016e
commit 1fa8e75f44

View file

@ -103,7 +103,7 @@ gst_cv_smooth_type_get_type (void)
#define DEFAULT_CV_SMOOTH_TYPE CV_GAUSSIAN #define DEFAULT_CV_SMOOTH_TYPE CV_GAUSSIAN
#define DEFAULT_PARAM1 3 #define DEFAULT_PARAM1 3
#define DEFAULT_PARAM2 0.0 #define DEFAULT_PARAM2 0
#define DEFAULT_PARAM3 0.0 #define DEFAULT_PARAM3 0.0
#define DEFAULT_PARAM4 0.0 #define DEFAULT_PARAM4 0.0
@ -253,7 +253,7 @@ gst_cv_smooth_set_property (GObject * object, guint prop_id,
gint prop = g_value_get_int (value); gint prop = g_value_get_int (value);
if (prop % 2 == 1 || prop == 0) { if (prop % 2 == 1 || prop == 0) {
filter->param1 = prop; filter->param2 = prop;
} else { } else {
GST_WARNING_OBJECT (filter, "Ignoring value for param2, not odd" GST_WARNING_OBJECT (filter, "Ignoring value for param2, not odd"
" nor zero (%d)", prop); " nor zero (%d)", prop);