mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
aggregator: Assert if the sink/src pad type that is to be used is not a GstAggregatorPad or subclass thereof
This commit is contained in:
parent
b8455445c5
commit
21798184a0
1 changed files with 2 additions and 0 deletions
|
@ -1699,6 +1699,7 @@ gst_aggregator_default_create_new_pad (GstAggregator * self,
|
|||
}
|
||||
|
||||
name = g_strdup_printf ("sink_%u", serial);
|
||||
g_assert (g_type_is_a (pad_type, GST_TYPE_AGGREGATOR_PAD));
|
||||
agg_pad = g_object_new (pad_type,
|
||||
"name", name, "direction", GST_PAD_SINK, "template", templ, NULL);
|
||||
g_free (name);
|
||||
|
@ -2465,6 +2466,7 @@ gst_aggregator_init (GstAggregator * self, GstAggregatorClass * klass)
|
|||
GST_PAD_TEMPLATE_GTYPE (pad_template) ==
|
||||
G_TYPE_NONE ? GST_TYPE_AGGREGATOR_PAD :
|
||||
GST_PAD_TEMPLATE_GTYPE (pad_template);
|
||||
g_assert (g_type_is_a (pad_type, GST_TYPE_AGGREGATOR_PAD));
|
||||
self->srcpad =
|
||||
g_object_new (pad_type, "name", "src", "direction", GST_PAD_SRC,
|
||||
"template", pad_template, NULL);
|
||||
|
|
Loading…
Reference in a new issue