mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
glcontext: Make gst_gl_context_egl_activate fail if the old surface could not be destroyed
https://bugzilla.gnome.org/show_bug.cgi?id=746251
This commit is contained in:
parent
f283d72636
commit
93d2e67cbc
1 changed files with 6 additions and 1 deletions
|
@ -523,8 +523,13 @@ gst_gl_context_egl_activate (GstGLContext * context, gboolean activate)
|
|||
"Handle changed (have:%p, now:%p), switching surface",
|
||||
(void *) egl->window_handle, (void *) handle);
|
||||
if (egl->egl_surface) {
|
||||
eglDestroySurface (egl->egl_display, egl->egl_surface);
|
||||
result = eglDestroySurface (egl->egl_display, egl->egl_surface);
|
||||
egl->egl_surface = EGL_NO_SURFACE;
|
||||
if (!result) {
|
||||
GST_ERROR_OBJECT (context, "Failed to destroy old window surface: %s",
|
||||
gst_gl_context_egl_get_error_string ());
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
egl->egl_surface =
|
||||
eglCreateWindowSurface (egl->egl_display, egl->egl_config, handle,
|
||||
|
|
Loading…
Reference in a new issue