mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
gldisplay: synchronize the searching and creation of GstGLContext's
Ootherwise we could end up with multiple elements in different chains each creating a context. Fixes context creation with glvideomixer.
This commit is contained in:
parent
9827138061
commit
66a5cad6c1
1 changed files with 2 additions and 0 deletions
|
@ -484,6 +484,7 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query)
|
|||
_find_local_gl_context (mix);
|
||||
|
||||
if (!mix->context) {
|
||||
GST_OBJECT_LOCK (mix->display);
|
||||
do {
|
||||
if (mix->context)
|
||||
gst_object_unref (mix->context);
|
||||
|
@ -497,6 +498,7 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query)
|
|||
goto context_error;
|
||||
}
|
||||
} while (!gst_gl_display_add_context (mix->display, mix->context));
|
||||
GST_OBJECT_UNLOCK (mix->display);
|
||||
}
|
||||
|
||||
if (mix_class->decide_allocation)
|
||||
|
|
Loading…
Reference in a new issue