fb: Fix buffer allocation

Width and height got mixed up.
dmabuf-import
Andri Yngvason 2021-09-11 18:16:54 +00:00
parent dad1948e98
commit a14b829743
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height,
fb->fourcc_format = fourcc_format;
fb->stride = stride;
size_t size = width * stride * 4; /* Assume 4 byte format for now */
size_t size = height * stride * 4; /* Assume 4 byte format for now */
size_t alignment = MAX(4, sizeof(void*));
size_t aligned_size = ALIGN_UP(size, alignment);