mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
ext/libpostproc/gstpostproc.c: It works better when filing the hash_table BEFORE registering the element.
Original commit message from CVS: * ext/libpostproc/gstpostproc.c: (gst_postproc_register): It works better when filing the hash_table BEFORE registering the element.
This commit is contained in:
parent
d6e988fe96
commit
7c05c7fc1e
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-06-20 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* ext/libpostproc/gstpostproc.c: (gst_postproc_register):
|
||||
It works better when filing the hash_table BEFORE registering the element.
|
||||
|
||||
2005-06-20 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* ext/Makefile.am: (SUBDIRS):
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue