From 8dd4d19854f0bd4c1ed71fd26af31ca52a398475 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 2 Jan 2004 23:52:59 +0000 Subject: [PATCH] gst/gstelement.c: Refuse registering a pad template if another pad template with the same name already exists (#114715). Original commit message from CVS: 2004-01-03 Ronald Bultje * gst/gstelement.c: (gst_element_class_add_pad_template): Refuse registering a pad template if another pad template with the same name already exists (#114715). --- ChangeLog | 6 ++++++ gst/gstelement.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 09a1202..f3e4e91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-01-03 Ronald Bultje + + * gst/gstelement.c: (gst_element_class_add_pad_template): + Refuse registering a pad template if another pad template + with the same name already exists (#114715). + 2004-01-02 David Schleef * gst/gstcaps.c: (_gst_structure_is_equal_foreach), diff --git a/gst/gstelement.c b/gst/gstelement.c index 6bd056d..ddfbffb 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1195,6 +1195,8 @@ gst_element_class_add_pad_template (GstElementClass *klass, g_return_if_fail (GST_IS_ELEMENT_CLASS (klass)); g_return_if_fail (templ != NULL); g_return_if_fail (GST_IS_PAD_TEMPLATE (templ)); + /* avoid registering pad templates with the same name */ + g_return_if_fail (gst_element_class_get_pad_template (klass, templ->name_template) == NULL); templ_copy = g_memdup(templ, sizeof(GstPadTemplate)); -- 2.7.4