glcontext: keep a ref to the active thread
authorfvanzile <frank@fvanzile.com>
Thu, 23 Feb 2017 23:42:08 +0000 (15:42 -0800)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 May 2017 07:49:29 +0000 (10:49 +0300)
commit63627a8c715ef6a762d40f640a1d2afd864cbd11
tree0afa580b5be84e9aba510aac7736751c14814ef5
parent8f270a5b68a6bfd6eb0392fb7031fb1f0d6ecbc0
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