gldisplay: always unref the context on a collision
authorMatthew Waters <matthew@centricular.com>
Thu, 26 May 2016 10:16:07 +0000 (20:16 +1000)
committerMatthew Waters <matthew@centricular.com>
Thu, 26 May 2016 10:19:13 +0000 (20:19 +1000)
commite597e450086d547cbacdcab94785ebddc3393fed
treed8f2aa675360314d3a0807e55cbf91516eab6f89
parentff3b60a969e5de61cc45bdb35e4867d3cdb64c16
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