mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
glstereosplit: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
This commit is contained in:
parent
f0040149a0
commit
acb8f2ee5d
1 changed files with 3 additions and 17 deletions
|
@ -528,23 +528,9 @@ ensure_context_unlocked (GstGLStereoSplit * self)
|
|||
|
||||
_find_local_gl_context_unlocked (self);
|
||||
|
||||
if (!self->context) {
|
||||
GST_OBJECT_LOCK (self->display);
|
||||
do {
|
||||
if (self->context)
|
||||
gst_object_unref (self->context);
|
||||
/* just get a GL context. we don't care */
|
||||
self->context =
|
||||
gst_gl_display_get_gl_context_for_thread (self->display, NULL);
|
||||
if (!self->context) {
|
||||
if (!gst_gl_display_create_context (self->display, self->other_context,
|
||||
&self->context, &error)) {
|
||||
GST_OBJECT_UNLOCK (self->display);
|
||||
goto context_error;
|
||||
}
|
||||
}
|
||||
} while (!gst_gl_display_add_context (self->display, self->context));
|
||||
GST_OBJECT_UNLOCK (self->display);
|
||||
if (!gst_gl_display_ensure_context (self->display, self->other_context,
|
||||
&self->context, &error)) {
|
||||
goto context_error;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue