mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +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",
|
"Handle changed (have:%p, now:%p), switching surface",
|
||||||
(void *) egl->window_handle, (void *) handle);
|
(void *) egl->window_handle, (void *) handle);
|
||||||
if (egl->egl_surface) {
|
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;
|
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 =
|
egl->egl_surface =
|
||||||
eglCreateWindowSurface (egl->egl_display, egl->egl_config, handle,
|
eglCreateWindowSurface (egl->egl_display, egl->egl_config, handle,
|
||||||
|
|
Loading…
Reference in a new issue