glcontext: keep a ref to the active thread
authorfvanzile <frank@fvanzile.com>
Thu, 23 Feb 2017 23:42:08 +0000 (15:42 -0800)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:28 +0000 (19:32 +0000)
commit178bbc253da2e295018513de5b6c9a477d2b1125
tree37cc6554a86d139ddc5c5f17b5e822ab297d461c
parentc020f421e19cfb1bb8012683b54dc18aaa92f452
glcontext: keep a ref to the active thread

With the macOS/iOS implementations, the active thread can change
multiple times over the life of a pipeline which would expose a race in
the thread tracking.

Fix by taking a ref on the active thread while the context is active.

https://bugzilla.gnome.org/show_bug.cgi?id=779202
gst-libs/gst/gl/gstglcontext.c