GNOME Bugzilla – Bug 761448
gst_uri_from_string segmentation fault
Last modified: 2016-02-02 11:00:24 UTC
I have this really simple program: #include <gst/gst.h> int main( int argc, char** argv ) { const gchar * string_uri = "http://admin:admin@127.0.0.1/media/info?test=1"; GstUri * parsed_uri = gst_uri_from_string(string_uri); return 0; } It segfault, apparently with the following stack: (gdb) bt full
+ Trace 235944
I wasn't able to test with 1.6.3, but I didn't see any commit that improved the situation. Did I missed something?
Sorry, the backtrace from the initial description is not really the one from the included source code, I was testing with some printf. But it fails on gst_uri_from_string.
I think you need to call gst_init() before using this API.
OK. Adding call gst_init works. I may have missed it in the documentation, but this requirements is nowhere to be found in the GstUri page.
It pretty much applies to all GStreamer API, unless explicitly mentioned otherwise :) I'll check if I can add a guard somewhere..
commit f90126a62e6b87db0c7627a86a40ed32e6d7334d Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue Feb 2 10:56:35 2016 +0000 uri: add guard to make sure gstreamer is initialized https://bugzilla.gnome.org/show_bug.cgi?id=761448
We will end up adding guards like that all around if we go that way ;)
Wow. Incredible reactivity time. Many thanks for making Gstreamer an awesome software!