mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 03:30:35 +00:00
glimagesink: don't make gst_glimage_sink_handle_events call _ensure_gl_setup
gst_glimage_sink_handle_events can be called from the overlay interface and from the main thread before GL is setup. Before this change, that would call _ensure_gl_setup() and deadlock on OSX. Change things so that it's always safe to call gst_glimage_sink_handle_events() without stuff deadlocking.
This commit is contained in:
parent
ab8990c89f
commit
c3612847ef
1 changed files with 2 additions and 3 deletions
|
@ -513,6 +513,8 @@ _ensure_gl_setup (GstGLImageSink * gl_sink)
|
|||
goto context_error;
|
||||
}
|
||||
|
||||
gst_gl_window_handle_events (window, gl_sink->handle_events);
|
||||
|
||||
/* setup callbacks */
|
||||
gst_gl_window_set_resize_callback (window,
|
||||
GST_GL_WINDOW_RESIZE_CB (gst_glimage_sink_on_resize),
|
||||
|
@ -976,9 +978,6 @@ gst_glimage_sink_handle_events (GstVideoOverlay * overlay,
|
|||
GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (overlay);
|
||||
|
||||
glimage_sink->handle_events = handle_events;
|
||||
|
||||
_ensure_gl_setup (glimage_sink);
|
||||
|
||||
if (G_LIKELY (glimage_sink->context)) {
|
||||
GstGLWindow *window;
|
||||
window = gst_gl_context_get_window (glimage_sink->context);
|
||||
|
|
Loading…
Reference in a new issue