exclusion: exception when set factor to 0

When factor property is set to 0, transform just returns.
Adjust the minimum value to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=743907
This commit is contained in:
Vineeth T M 2015-05-26 14:14:34 +01:00 committed by Luis de Bethencourt
parent db9e0cf5c7
commit 5985bc4b05

View file

@ -151,7 +151,7 @@ gst_exclusion_class_init (GstExclusionClass * klass)
g_object_class_install_property (gobject_class, PROP_FACTOR, g_object_class_install_property (gobject_class, PROP_FACTOR,
g_param_spec_uint ("factor", "Factor", g_param_spec_uint ("factor", "Factor",
"Exclusion factor parameter", 0, 175, DEFAULT_FACTOR, "Exclusion factor parameter", 1, 175, DEFAULT_FACTOR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
vfilter_class->transform_frame = vfilter_class->transform_frame =
@ -270,9 +270,6 @@ transform (guint32 * src, guint32 * dest, gint video_area, gint factor)
guint32 in; guint32 in;
gint x, red, green, blue; gint x, red, green, blue;
if (G_UNLIKELY (factor == 0))
return;
for (x = 0; x < video_area; x++) { for (x = 0; x < video_area; x++) {
in = *src++; in = *src++;