diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index d6837fe5dc..ae89168e1f 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -94,6 +94,8 @@ _ensure_window (GstGLContext * context) window = gst_gl_window_new (context->priv->display); gst_gl_context_set_window (context, window); + + gst_object_unref (window); } static void diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c index 6036c5ab5f..186af5d449 100644 --- a/gst/gl/gstglimagesink.c +++ b/gst/gl/gstglimagesink.c @@ -464,6 +464,7 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) glimage_sink->display = NULL; } gst_object_unref (glimage_sink->context); + gst_object_unref (window); return GST_STATE_CHANGE_FAILURE; }