mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
glimagesink: First handle GL window setup, then create the context and its thread
This commit is contained in:
parent
871ddef9ce
commit
0bd53c9ccb
1 changed files with 4 additions and 3 deletions
|
@ -407,9 +407,6 @@ _ensure_gl_setup (GstGLImageSink * gl_sink)
|
|||
GstGLWindow *window;
|
||||
|
||||
gl_sink->context = gst_gl_context_new (gl_sink->display);
|
||||
if (!gst_gl_context_create (gl_sink->context, gl_sink->other_context,
|
||||
&error))
|
||||
goto context_error;
|
||||
|
||||
window = gst_gl_context_get_window (gl_sink->context);
|
||||
|
||||
|
@ -421,6 +418,10 @@ _ensure_gl_setup (GstGLImageSink * gl_sink)
|
|||
gst_gl_window_set_window_handle (window, gl_sink->window_id);
|
||||
}
|
||||
|
||||
if (!gst_gl_context_create (gl_sink->context, gl_sink->other_context,
|
||||
&error))
|
||||
goto context_error;
|
||||
|
||||
/* setup callbacks */
|
||||
gst_gl_window_set_resize_callback (window,
|
||||
GST_GL_WINDOW_RESIZE_CB (gst_glimage_sink_on_resize),
|
||||
|
|
Loading…
Reference in a new issue