[Gstreamer-bugs] [Bug 112745] Changed - registry has garbage characters

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Sat May 10 22:29:09 PDT 2003


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=112745

Changed by ds at schleef.org.

--- shadow/112745	Sat May 10 19:38:00 2003
+++ shadow/112745.tmp.31815	Sun May 11 01:29:09 2003
@@ -1,12 +1,12 @@
 Bug#: 112745
 Product: GStreamer
 Version: HEAD CVS
 OS: Linux
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
 Resolution: 
 Severity: normal
 Priority: Normal
 Component: gstreamer (core)
 AssignedTo: gstreamer-maint at bugzilla.gnome.org                            
 ReportedBy: ds at schleef.org               
@@ -36,6 +36,30 @@
 </feature>
 
 ------- Additional Comments From ds at schleef.org  2003-05-10 19:37 -------
 Created an attachment (id=16418)
 complete registry.xml
 
+
+------- Additional Comments From ds at schleef.org  2003-05-11 01:29 -------
+Ok, I figured out why this happens.  Silly me, I was using
+GST_PLUGIN_PATH=/home/ds/gst/gstreamer, and gst-register would load
+each plugin *twice*.  The problem is that features added to the
+elementfactory are only ref'd once.  When a second factory is added
+with the same name, the old factory is cleaned in
+gst_element_factory_cleanup(), which unrefs all the features, thereby
+destroying them.  When the features are added the second time, the
+same object pointers are used, since they're static variables in the
+pad template factory functions.  Thus destroyed objects are added to
+the factory.
+
+I think the appropriate solution is to make sure that factory
+functions properly call gst_object_ref(), if they create objects and
+store the pointer in a static variable.
+
+The first place to start is GST_PAD_TEMPLATE_FACTORY().  Because of
+this, I don't think it's possible to work this solution into 0.6.
+
+Instead, I'm fixing gst_element_factory_cleanup() to not unref the
+features.
+
+Comments are welcome.





More information about the Gstreamer-bugs mailing list