Move padtemplate clearing from class_init to base_init

Original commit message from CVS:
Move padtemplate clearing from class_init to base_init
This commit is contained in:
David Schleef 2004-01-03 01:25:01 +00:00
parent 8dd4d19854
commit f69c95d94c
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2004-01-02 David Schleef <ds@schleef.org>
* gst/gstelement.c: (gst_element_class_init),
(gst_element_base_class_init): ->padtemplates should be cleared
in base_init, since we need to have a fresh list for every
class. (Alternately, we chould copy the list and share the
actual pad templates (not the list), but that would require
changing every plugin to move pad template registration from
base_init to class_init.)
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gst/gstelement.c: (gst_element_class_add_pad_template):

View file

@ -154,7 +154,6 @@ gst_element_class_init (GstElementClass *klass)
klass->change_state = GST_DEBUG_FUNCPTR (gst_element_change_state);
klass->error = GST_DEBUG_FUNCPTR (gst_element_error_func);
klass->found_tag = GST_DEBUG_FUNCPTR (gst_element_found_tag_func);
klass->padtemplates = NULL;
klass->numpadtemplates = 0;
klass->elementfactory = NULL;
@ -164,9 +163,13 @@ static void
gst_element_base_class_init (gpointer g_class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gobject_class->set_property = GST_DEBUG_FUNCPTR(gst_element_real_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR(gst_element_real_get_property);
element_class->padtemplates = NULL;
}
static void