diff --git a/ChangeLog b/ChangeLog index 3b670a3fd1..5958f964aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-20 Edward Hervey + + * ext/libpostproc/gstpostproc.c: (gst_postproc_register): + It works better when filing the hash_table BEFORE registering the element. + 2005-06-20 Edward Hervey * ext/Makefile.am: (SUBDIRS): diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c index be34068ce6..b8b7c5434e 100644 --- a/ext/libpostproc/gstpostproc.c +++ b/ext/libpostproc/gstpostproc.c @@ -470,6 +470,10 @@ gst_postproc_register(GstPlugin * plugin) for (i = 0; filterdetails[i].shortname; i++) { gchar *type_name; + g_hash_table_insert (global_plugins, + GINT_TO_POINTER (0), + GINT_TO_POINTER (i)); + /* create type_name */ type_name = g_strdup_printf("postproc_%s", filterdetails[i].longname); if (g_type_from_name (type_name)) { @@ -480,6 +484,10 @@ gst_postproc_register(GstPlugin * plugin) /* create gtype */ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0); + g_hash_table_insert (global_plugins, + GINT_TO_POINTER (type), + GINT_TO_POINTER (i)); + /* register element */ if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY, type)) { g_free(type_name); @@ -487,9 +495,6 @@ gst_postproc_register(GstPlugin * plugin) } g_free(type_name); - g_hash_table_insert (global_plugins, - GINT_TO_POINTER (type), - GINT_TO_POINTER (i)); } g_hash_table_remove (global_plugins, GINT_TO_POINTER (0)); return TRUE;