GNOME Bugzilla – Bug 684765
Plugins without a klass in the metadata crashes autoaudiosink
Last modified: 2012-09-25 13:12:59 UTC
I have a plugin which doesn't call gst_element_class_set_static_metadata and it causes this crash in the autoaudiosink: gst-launch-1.0 -v -m audiotestsrc ! audioconvert ! audioresample ! autoaudiosink Setting pipeline to PAUSED ... Before klass Caught SIGSEGV accessing address (nil)
+ Trace 230903
Your element should have called gst_element_set_metadata(), it's not allowed to register (gst_element_register()) elements without the metadata. We should add checks for that and fail if someone tries to do it.
Created attachment 225130 [details] [review] plugin: Fail if no valid plugin metadata is set
Created attachment 225131 [details] [review] elementfactory: Fail if no valid element factory metadata is set
Maybe it should be g_warning() rather than GST_ERROR, since the latter is not necessarily printed at all when the debugging system is disabled, and isn't printed unless *:1 is use. Also, it's kind of a programming error in a way.
commit 24cad1a91cb8029017cc41a7288ba9a6728b2a9c Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue Sep 25 13:09:38 2012 +0200 elementfactory: Fail if no valid element factory metadata is set commit cfc7661f654f7a3ee1bbf479629569f555372fbf Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue Sep 25 13:09:28 2012 +0200 plugin: Fail if no valid plugin metadata is set