mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 09:04:15 +00:00
alpha: Protect property values from changes during frame processing
This commit is contained in:
parent
bc873f7133
commit
9e4ebba45e
1 changed files with 4 additions and 0 deletions
|
@ -217,6 +217,7 @@ gst_alpha_set_property (GObject * object, guint prop_id,
|
||||||
{
|
{
|
||||||
GstAlpha *alpha = GST_ALPHA (object);
|
GstAlpha *alpha = GST_ALPHA (object);
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (alpha);
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_METHOD:
|
case PROP_METHOD:
|
||||||
alpha->method = g_value_get_enum (value);
|
alpha->method = g_value_get_enum (value);
|
||||||
|
@ -269,6 +270,7 @@ gst_alpha_set_property (GObject * object, guint prop_id,
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
GST_OBJECT_UNLOCK (alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -798,6 +800,7 @@ gst_alpha_transform (GstBaseTransform * btrans, GstBuffer * in, GstBuffer * out)
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||||
gst_object_sync_values (G_OBJECT (alpha), timestamp);
|
gst_object_sync_values (G_OBJECT (alpha), timestamp);
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (alpha);
|
||||||
switch (alpha->method) {
|
switch (alpha->method) {
|
||||||
case ALPHA_METHOD_SET:
|
case ALPHA_METHOD_SET:
|
||||||
if (alpha->ayuv) {
|
if (alpha->ayuv) {
|
||||||
|
@ -822,6 +825,7 @@ gst_alpha_transform (GstBaseTransform * btrans, GstBuffer * in, GstBuffer * out)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
GST_OBJECT_UNLOCK (alpha);
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue