mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 14:11:15 +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);
|
_find_local_gl_context (mix);
|
||||||
|
|
||||||
if (!mix->context) {
|
if (!mix->context) {
|
||||||
|
GST_OBJECT_LOCK (mix->display);
|
||||||
do {
|
do {
|
||||||
if (mix->context)
|
if (mix->context)
|
||||||
gst_object_unref (mix->context);
|
gst_object_unref (mix->context);
|
||||||
|
@ -497,6 +498,7 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query)
|
||||||
goto context_error;
|
goto context_error;
|
||||||
}
|
}
|
||||||
} while (!gst_gl_display_add_context (mix->display, mix->context));
|
} while (!gst_gl_display_add_context (mix->display, mix->context));
|
||||||
|
GST_OBJECT_UNLOCK (mix->display);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mix_class->decide_allocation)
|
if (mix_class->decide_allocation)
|
||||||
|
|
Loading…
Reference in a new issue