From 1fa8e75f444de606f21fda12fa05cc009f5320d6 Mon Sep 17 00:00:00 2001 From: Vineeth T M Date: Mon, 18 May 2015 14:01:59 +0900 Subject: [PATCH] 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 --- ext/opencv/gstcvsmooth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opencv/gstcvsmooth.c b/ext/opencv/gstcvsmooth.c index 67f403e917..12247b59c9 100644 --- a/ext/opencv/gstcvsmooth.c +++ b/ext/opencv/gstcvsmooth.c @@ -103,7 +103,7 @@ gst_cv_smooth_type_get_type (void) #define DEFAULT_CV_SMOOTH_TYPE CV_GAUSSIAN #define DEFAULT_PARAM1 3 -#define DEFAULT_PARAM2 0.0 +#define DEFAULT_PARAM2 0 #define DEFAULT_PARAM3 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); if (prop % 2 == 1 || prop == 0) { - filter->param1 = prop; + filter->param2 = prop; } else { GST_WARNING_OBJECT (filter, "Ignoring value for param2, not odd" " nor zero (%d)", prop); -- 2.34.1