dmabuf: Fix the disjointness check

We were checking the wrong fds here.

This came up while toying with udmabuf and creating multi-plane
NV12 buffers.
This commit is contained in:
Matthias Clasen
2024-07-30 23:44:07 -04:00
parent 269dcaaadf
commit 249cf0833c

View File

@@ -2475,7 +2475,7 @@ gdk_dmabuf_is_disjoint (const GdkDmabuf *dmabuf)
{
struct stat plane_stat;
if (fstat (dmabuf->planes[0].fd, &plane_stat) != 0)
if (fstat (dmabuf->planes[i].fd, &plane_stat) != 0)
return TRUE;
if (first_stat.st_ino != plane_stat.st_ino)