glimagesink: First handle GL window setup, then create the context and its thread

This commit is contained in:
Sebastian Dröge 2014-04-12 17:01:09 +02:00
parent 871ddef9ce
commit 0bd53c9ccb

View file

@ -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),