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  <rbultje@ronald.bitfreak.net>

* 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).
This commit is contained in:
Ronald S. Bultje 2004-01-02 23:52:59 +00:00
parent a77e6e35e4
commit 8dd4d19854
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
* 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 <ds@schleef.org>
* gst/gstcaps.c: (_gst_structure_is_equal_foreach),

View file

@ -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));