Missing pointer initialization in gstqtglutility.cc

claus.stovgaard at gmail.com claus.stovgaard at gmail.com
Fri Nov 4 13:44:24 UTC 2022

Hi folks.

I have just created 

In gstqtglutility.cc from plugins-good (subprojects/gst-plugins-
good/ext/qt/gstqtglutility.cc) we have a function for wrapcontext

    178 gboolean
    179 gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
    180     GstGLContext **wrap_glcontext, GstGLContext **context)
    181 {

Inside this I suggest that we change line 186 from

GError *error;


GError *error = NULL;

Because the error pointer risk to be used uninitialized, and you are
getting issues like

GLib-WARNING **: 15:15:48.900: GError set over the top of a previous
GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is
NULL before it's set.

Setting it to NULL fixes it.


More information about the gstreamer-devel mailing list