From 3ebbc6b5df5c2ff6f6b9d8ef1f49b7afc3dbb06e Mon Sep 17 00:00:00 2001 From: Matteo Valdina Date: Fri, 31 Aug 2018 09:47:59 -0500 Subject: [PATCH] gl-renderer: Explicitly zeroing the offset for 2^ plane of SHM_FOMRAT_YUYV This fix a crash, when gl-renderer uploads the 2^ texture for YUYV. The pixels buffer was offset of a random value. --- libweston/gl-renderer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index 2c50d2da..7a848cd1 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -1629,6 +1629,7 @@ gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer, pitch = wl_shm_buffer_get_stride(shm_buffer) / 2; gl_pixel_type = GL_UNSIGNED_BYTE; num_planes = 2; + gs->offset[1] = 0; gs->hsub[1] = 2; gs->vsub[1] = 1; if (gr->has_gl_texture_rg)