From a791648600ce9ac776d72c1ef7cdee3abee96950 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 17 Sep 2024 10:36:58 -0400 Subject: [PATCH] aja: there is no need to take object lock Both _sink_event() and _aggregate() vfunc are called from the source pad streaming thread. There is thus no need to protect caps fields. Part-of: --- .../gst-plugins-bad/sys/aja/gstajasinkcombiner.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/aja/gstajasinkcombiner.cpp b/subprojects/gst-plugins-bad/sys/aja/gstajasinkcombiner.cpp index 122f895824..6bdbc9ff8a 100644 --- a/subprojects/gst-plugins-bad/sys/aja/gstajasinkcombiner.cpp +++ b/subprojects/gst-plugins-bad/sys/aja/gstajasinkcombiner.cpp @@ -47,10 +47,8 @@ G_DEFINE_TYPE(GstAjaSinkCombiner, gst_aja_sink_combiner, GST_TYPE_AGGREGATOR); static void gst_aja_sink_combiner_finalize(GObject *object) { GstAjaSinkCombiner *self = GST_AJA_SINK_COMBINER(object); - GST_OBJECT_LOCK(self); gst_caps_replace(&self->audio_caps, NULL); gst_caps_replace(&self->video_caps, NULL); - GST_OBJECT_UNLOCK(self); G_OBJECT_CLASS(parent_class)->finalize(object); } @@ -154,15 +152,11 @@ static gboolean gst_aja_sink_combiner_sink_event(GstAggregator *aggregator, gst_event_parse_caps(event, &caps); if (agg_pad == GST_AGGREGATOR_PAD_CAST(self->audio_sinkpad)) { - GST_OBJECT_LOCK(self); gst_caps_replace(&self->audio_caps, caps); self->caps_changed = TRUE; - GST_OBJECT_UNLOCK(self); } else if (agg_pad == GST_AGGREGATOR_PAD_CAST(self->video_sinkpad)) { - GST_OBJECT_LOCK(self); gst_caps_replace(&self->video_caps, caps); self->caps_changed = TRUE; - GST_OBJECT_UNLOCK(self); } break; @@ -230,10 +224,8 @@ static gboolean gst_aja_sink_combiner_negotiate(GstAggregator *aggregator) { static gboolean gst_aja_sink_combiner_stop(GstAggregator *aggregator) { GstAjaSinkCombiner *self = GST_AJA_SINK_COMBINER(aggregator); - GST_OBJECT_LOCK(self); gst_caps_replace(&self->audio_caps, NULL); gst_caps_replace(&self->video_caps, NULL); - GST_OBJECT_UNLOCK(self); return TRUE; }