gl: avoid deadlock querying for OpenGL context
authorMatthew Waters <matthew@centricular.com>
Fri, 24 Apr 2020 04:44:46 +0000 (14:44 +1000)
committerMatthew Waters <matthew@centricular.com>
Fri, 24 Apr 2020 08:03:16 +0000 (18:03 +1000)
commita4e49ba8c9657e2230aad32b6988bbda7a755440
tree227e5548e247391347e9c4076815143f0bf4c146
parent4a7a247293d197eaab3150c59dd2ea2a5d6c728a
gl: avoid deadlock querying for OpenGL context

If there are two elements and threads attempting to query each other for
an OpenGL context. The locking may result in a deadlock.

We need to unlock each element's context_lock when querying another
element for the OpenGL context in order to allow any other element to
take the lock when the other element is querying for an OpenGL context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642>
ext/gl/gstglbasemixer.c
ext/gl/gstglmixerbin.c
ext/gl/gstglstereosplit.c
gst-libs/gst/gl/gstglbasefilter.c
gst-libs/gst/gl/gstglbasesrc.c
tests/check/elements/glmixer.c [new file with mode: 0644]
tests/check/meson.build