mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-26 14:18:36 +00:00
server: Fix alloc_lz_image_surface stride allocations
All lz surfaces are not 4 bytes per pixel, calculate the right stride based on the pixman format.
This commit is contained in:
parent
f912ffbc2a
commit
698d0e471a
@ -290,7 +290,7 @@ pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data,
|
||||
int stride;
|
||||
pixman_image_t *surface = NULL;
|
||||
|
||||
stride = (gross_pixels / height) * 4;
|
||||
stride = (gross_pixels / height) * (PIXMAN_FORMAT_BPP (pixman_format) / 8);
|
||||
|
||||
if (!top_down) {
|
||||
stride = -stride;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user