diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-15 08:21:54 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-15 08:21:54 +0200 |
commit | 0b9d232ce8881ccf991817862e2e5b3a8bc0a73d (patch) | |
tree | e4828d0459ba4bc77d3ba44f03211411ef991858 /src/pipewire.c | |
parent | 8e3014aa97d30ba3b24d5409be00db6ecd76f4b3 (diff) |
Fix crash, use opengl es instead of opengl desktop
Diffstat (limited to 'src/pipewire.c')
-rw-r--r-- | src/pipewire.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pipewire.c b/src/pipewire.c index 35f0e45..c81ddde 100644 --- a/src/pipewire.c +++ b/src/pipewire.c @@ -640,7 +640,6 @@ static bool gsr_pipewire_bind_image_to_texture(gsr_pipewire *self, EGLImage imag self->egl->glBindTexture(texture_target, texture_id); self->egl->glEGLImageTargetTexture2DOES(texture_target, image); const bool success = self->egl->glGetError() == 0; - self->egl->eglDestroyImage(self->egl->egl_display, image); self->egl->glBindTexture(texture_target, 0); return success; } @@ -693,12 +692,8 @@ bool gsr_pipewire_map_texture(gsr_pipewire *self, gsr_texture_map texture_map, g } } - const int texture_target = self->external_texture_fallback ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; - while(self->egl->glGetError() != 0){} - self->egl->glBindTexture(texture_target, texture_map.texture_id); - self->egl->glEGLImageTargetTexture2DOES(texture_target, image); - self->egl->eglDestroyImage(self->egl->egl_display, image); - self->egl->glBindTexture(texture_target, 0); + if(image) + self->egl->eglDestroyImage(self->egl->egl_display, image); if(self->cursor.data) { self->egl->glBindTexture(GL_TEXTURE_2D, texture_map.cursor_texture_id); |