[gst-devel] Possible race-condition when using g_enum_register_static

Wim Taymans wim.taymans at gmail.com
Thu Oct 18 12:59:32 CEST 2007


On Thu, 2007-10-18 at 12:46 +0200, Michal Benes wrote:
> Thank you Tim and Jan for explaining me the issue.
> 
> > > The problem is that the code like this is quite common in GStreamer.
> > > Am I wrong or is this a real problem?
> > 
> > I am not sure whether this really is a problem in practice, since these
> > _get_type() functions will first be called from within the plugin_init
> > function when the plugin is loaded and the element is registered [*],
> > and the plugin loading is serialised.
> 
> So my problem is actually a bug in GstMad which references
> GstMadEmphasis only on _chain function. The easy solution is to
> reference this type in class_init (plugin_init is located in another
> source file and it does not have access to GstMadEmphasis API). I will
> create a bug with patch for this.
> 
> Still a similar problem might be in other plugins and it would be very
> painful to check all GType initializations. It also seems to be
> maintenance nightmare. I will also look at the GOnce construct and how
> it could be used to solve this.

Also this bug might help:
http://bugzilla.gnome.org/show_bug.cgi?id=65041

Wim

> 
> 	Michal
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list