From 229b727017da9da3bf1c8a224c4968e0e2acbaad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 19 Oct 2023 19:44:21 +0300 Subject: [PATCH] aggregator: Allow passing unparented pads to gst_aggregator_pad_is_inactive() It's very difficult to ensure that a pad is still child of the aggregator during aggregation, so simply consider unparented pads as inactive instead of asserting. Part-of: --- subprojects/gstreamer/libs/gst/base/gstaggregator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gstreamer/libs/gst/base/gstaggregator.c b/subprojects/gstreamer/libs/gst/base/gstaggregator.c index 5c71132..31cdf67 100644 --- a/subprojects/gstreamer/libs/gst/base/gstaggregator.c +++ b/subprojects/gstreamer/libs/gst/base/gstaggregator.c @@ -3701,8 +3701,8 @@ gst_aggregator_pad_is_inactive (GstAggregatorPad * pad) gboolean inactive; self = GST_AGGREGATOR (gst_pad_get_parent_element (GST_PAD (pad))); - - g_assert_nonnull (self); + if (!self) + return FALSE; PAD_LOCK (pad); inactive = self->priv->ignore_inactive_pads && is_live_unlocked (self) -- 2.7.4