mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
glimagesink: only allow setting the GL display/context if it is a valid value
Otherwise, when setting the external application context, then the display may be cleared and then not used and the asharing mechanism does not work anymore. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2750>
This commit is contained in:
parent
073df3d820
commit
390518a296
1 changed files with 4 additions and 2 deletions
|
@ -1241,8 +1241,10 @@ gst_glimage_sink_set_context (GstElement * element, GstContext * context)
|
|||
GstGLDisplay *display = NULL;
|
||||
|
||||
gst_gl_handle_set_context (element, context, &display, &other_context);
|
||||
_set_other_context (gl_sink, other_context);
|
||||
_set_display (gl_sink, display);
|
||||
if (display)
|
||||
_set_display (gl_sink, display);
|
||||
if (other_context)
|
||||
_set_other_context (gl_sink, other_context);
|
||||
|
||||
if (gl_sink->display)
|
||||
gst_gl_display_filter_gl_api (gl_sink->display, SUPPORTED_GL_APIS);
|
||||
|
|
Loading…
Reference in a new issue