From 094ca1d1edb393ab3797d6e922e7c8c54d3defcf Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sun, 6 Jan 2013 12:12:40 +0300 Subject: [PATCH] screenshoter: don't use hardcoded bpp value Signed-off-by: Vasily Khoruzhick --- src/screenshooter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenshooter.c b/src/screenshooter.c index 840dfb8d..662aad4f 100644 --- a/src/screenshooter.c +++ b/src/screenshooter.c @@ -103,7 +103,7 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data) output->disable_planes--; wl_list_remove(&listener->link); - stride = l->buffer->width * 4; + stride = l->buffer->width * (PIXMAN_FORMAT_BPP(output->compositor->read_format) / 8); pixels = malloc(stride * l->buffer->height); if (pixels == NULL) {