mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gl: fails glimagesink when shader compilation went wrong
Those shaders are fixed and very simple so it should not fail but it's worth to handle a such case.
This commit is contained in:
parent
4844c53017
commit
c52dd44e60
1 changed files with 8 additions and 1 deletions
|
@ -998,6 +998,7 @@ gst_glimage_sink_thread_init_redisplay (GstGLImageSink * gl_sink)
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
error = NULL;
|
error = NULL;
|
||||||
gst_gl_context_clear_shader (gl_sink->context);
|
gst_gl_context_clear_shader (gl_sink->context);
|
||||||
|
gst_glimage_sink_cleanup_glthread (gl_sink);
|
||||||
} else {
|
} else {
|
||||||
gl_sink->redisplay_attr_position_loc =
|
gl_sink->redisplay_attr_position_loc =
|
||||||
gst_gl_shader_get_attribute_location (gl_sink->redisplay_shader,
|
gst_gl_shader_get_attribute_location (gl_sink->redisplay_shader,
|
||||||
|
@ -1214,9 +1215,15 @@ gst_glimage_sink_redisplay (GstGLImageSink * gl_sink)
|
||||||
|
|
||||||
#if GST_GL_HAVE_GLES2
|
#if GST_GL_HAVE_GLES2
|
||||||
if (USING_GLES2 (gl_sink->context)) {
|
if (USING_GLES2 (gl_sink->context)) {
|
||||||
if (!gl_sink->redisplay_shader) {
|
if (G_UNLIKELY (!gl_sink->redisplay_shader)) {
|
||||||
gst_gl_window_send_message (window,
|
gst_gl_window_send_message (window,
|
||||||
GST_GL_WINDOW_CB (gst_glimage_sink_thread_init_redisplay), gl_sink);
|
GST_GL_WINDOW_CB (gst_glimage_sink_thread_init_redisplay), gl_sink);
|
||||||
|
|
||||||
|
/* if the shader is still null it means it failed to be useable */
|
||||||
|
if (G_UNLIKELY (!gl_sink->redisplay_shader)) {
|
||||||
|
gst_object_unref (window);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue