GNOME Bugzilla – Bug 449105
gst.element_register() causes core dump
Last modified: 2007-06-29 16:11:03 UTC
Steps to reproduce: 1. include the code below in any python file 2. removing the __gstdetails__ variable stops the coredump, but the element will not properly register 3. commenting the last line of this code also stops the core dump Stack trace: import pygst pygst.require('0.10') import gst import gobject class Identity(gst.Element): __gstdetails__ = ('Identity Plugin', "identity.py", "Simple Identity Filter Example", "Corey O.") _srcpadtemplate = gst.PadTemplate ("srcpadtemplate", gst.PAD_SRC, gst.PAD_ALWAYS, gst.caps_new_any()) _sinkpadtemplate = gst.PadTemplate ("sinkpadtemplate", gst.PAD_SINK, gst.PAD_ALWAYS, gst.caps_new_any()) def __init__(self, name): gst.Element.__init__(self) self.set_name(name) self.srcpad = gst.Pad(self._srcpadtemplate, "src") self.sinkpad = gst.Pad(self._sinkpadtemplate, "sink") self.add_pad(self.srcpad) self.add_pad(self.sinkpad) self.sinkpad.set_chain_function(self.chainfunc) self.sinkpad.set_event_function(self.eventfunc) def chainfunc(self, pad, buffer): return self.srcpad.push(buffer) def eventfunc(self, pad, event): return self.srcpad.push_event(event) gobject.type_register(Identity) gst.element_register(Identity, 'identity') Other information:
current version of GStreamer is 0.10.12 from the feisty repository
This was fixed in 0.10.13 of GStreamer core: 2007-05-12 David Schleef <ds@schleef.org> * gst/gstelementfactory.c: Allow gst_element_register() to be called with plugin==NULL. Did nobody notice that static elements were broken?