diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2018-03-01 01:12:07 +0100 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2018-03-01 01:12:07 +0100 |
commit | 609adc06095f54c426ae3ad8879510610355c21c (patch) | |
tree | 203bdbe35b6fdbee50e65bcc48fe52c9e4469268 | |
parent | 60fae518b00d88fea7f6fda5c2d2eb453b42ae3d (diff) |
ghostpad: ensure we build a ghost pad ..
When we construct from a custom GType
-rw-r--r-- | gst/gstghostpad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index dd53122d5..90cae38a3 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -635,6 +635,8 @@ gst_ghost_pad_new_full (const gchar * name, GstPadDirection dir, GST_PAD_TEMPLATE_GTYPE (templ) == G_TYPE_NONE ? GST_TYPE_GHOST_PAD : GST_PAD_TEMPLATE_GTYPE (templ); + g_return_val_if_fail (g_type_is_a (pad_type, GST_TYPE_GHOST_PAD), NULL); + ret = g_object_new (pad_type, "name", name, "direction", dir, "template", templ, NULL); } else { |