glvideomixer: don't clear pad->geometry_change when setting an identical value

Closes #1715

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3733>
This commit is contained in:
Michiel Konstapel 2023-01-16 11:43:37 +01:00 committed by GStreamer Marge Bot
parent 59f4ebe321
commit 81b726344e

View file

@ -919,25 +919,25 @@ gst_gl_video_mixer_pad_set_property (GObject * object, guint prop_id,
switch (prop_id) { switch (prop_id) {
case PROP_PAD_XPOS:{ case PROP_PAD_XPOS:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->xpos; pad->geometry_change |= val != pad->xpos;
pad->xpos = val; pad->xpos = val;
break; break;
} }
case PROP_PAD_YPOS:{ case PROP_PAD_YPOS:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->ypos; pad->geometry_change |= val != pad->ypos;
pad->ypos = val; pad->ypos = val;
break; break;
} }
case PROP_PAD_WIDTH:{ case PROP_PAD_WIDTH:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->width; pad->geometry_change |= val != pad->width;
pad->width = val; pad->width = val;
break; break;
} }
case PROP_PAD_HEIGHT:{ case PROP_PAD_HEIGHT:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->height; pad->geometry_change |= val != pad->height;
pad->height = val; pad->height = val;
} }
break; break;
@ -976,25 +976,25 @@ gst_gl_video_mixer_pad_set_property (GObject * object, guint prop_id,
break; break;
case PROP_PAD_CROP_LEFT:{ case PROP_PAD_CROP_LEFT:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->crop_left; pad->geometry_change |= val != pad->crop_left;
pad->crop_left = val; pad->crop_left = val;
break; break;
} }
case PROP_PAD_CROP_RIGHT:{ case PROP_PAD_CROP_RIGHT:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->crop_right; pad->geometry_change |= val != pad->crop_right;
pad->crop_right = val; pad->crop_right = val;
break; break;
} }
case PROP_PAD_CROP_TOP:{ case PROP_PAD_CROP_TOP:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->crop_top; pad->geometry_change |= val != pad->crop_top;
pad->crop_top = val; pad->crop_top = val;
break; break;
} }
case PROP_PAD_CROP_BOTTOM:{ case PROP_PAD_CROP_BOTTOM:{
gint val = g_value_get_int (value); gint val = g_value_get_int (value);
pad->geometry_change = val != pad->crop_bottom; pad->geometry_change |= val != pad->crop_bottom;
pad->crop_bottom = val; pad->crop_bottom = val;
break; break;
} }