From 57acec4b1c0a8054bb5219bf4720ca7c5e98a7e4 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 26 May 2016 20:16:07 +1000 Subject: [PATCH] gldisplay: always unref the context on a collision Otherwise we will leak GstGLContext's when adding the same context more than once. Fixes a regression caused by 5f9d10f6036068502ad23e1ec86a73e341801ae1 in the gstglcontext unit test that failed with: Assertion 'tmp == NULL' failed --- gst-libs/gst/gl/gstgldisplay.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index ee8febc4b9..fee031679e 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -558,7 +558,6 @@ gst_gl_display_add_context (GstGLDisplay * display, GstGLContext * context) if (context == collision) { GST_LOG_OBJECT (display, "Attempting to add the same GL context %" GST_PTR_FORMAT ". Ignoring", context); - collision = NULL; ret = TRUE; goto out; }