summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 23:58:20 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 23:58:20 +0000
commit992c311650481701e80d76e2b5e100f1bc1b8bdf (patch)
tree6680051ba13b5dd4a2d6850d50fc384b7a2b2dee
parentfc0447cc23bd6db356db6c6da8ce144c172feda5 (diff)
downloadgst-plugins-bad-992c311650481701e80d76e2b5e100f1bc1b8bdf.tar.gz
gst-plugins-bad-992c311650481701e80d76e2b5e100f1bc1b8bdf.tar.bz2
gst-plugins-bad-992c311650481701e80d76e2b5e100f1bc1b8bdf.zip
This was wrong
Original commit message from CVS: This was wrong
-rw-r--r--ext/ladspa/gstladspa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index 4ed8b886..11bfd0f0 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -109,6 +109,9 @@ gst_ladspa_base_init (GstLADSPAClass *klass)
desc = g_hash_table_lookup(ladspa_descriptors,
GINT_TO_POINTER(G_TYPE_FROM_CLASS(klass)));
+ if (!desc)
+ desc = g_hash_table_lookup(ladspa_descriptors, GINT_TO_POINTER(0));
+ g_assert (desc);
/* construct the element details struct */
details = g_new0(GstElementDetails,1);
@@ -181,6 +184,9 @@ gst_ladspa_class_init (GstLADSPAClass *klass)
/* look up and store the ladspa descriptor */
desc = g_hash_table_lookup(ladspa_descriptors,
GINT_TO_POINTER(G_TYPE_FROM_CLASS(klass)));
+ if (!desc)
+ desc = g_hash_table_lookup(ladspa_descriptors, GINT_TO_POINTER(0));
+ g_assert (desc);
klass->numcontrols = 0;
@@ -983,6 +989,12 @@ ladspa_describe_plugin(const char *pcFullFilename,
g_free(type_name);
continue;
}
+
+ /* base-init temp alloc */
+ g_hash_table_insert(ladspa_descriptors,
+ GINT_TO_POINTER(0),
+ (gpointer)desc);
+
/* create the type now */
type = g_type_register_static(GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
if (!gst_element_register (ladspa_plugin, type_name, GST_RANK_NONE, type))
@@ -993,6 +1005,8 @@ ladspa_describe_plugin(const char *pcFullFilename,
GINT_TO_POINTER(type),
(gpointer)desc);
}
+
+ g_hash_table_remove (ladspa_descriptors, GINT_TO_POINTER (0));
}
static gboolean