dmabuf: Fix NV12 import

We were not seeking in the right fd,
so our sizes were wrong, and crashes
happened.
This commit is contained in:
Matthias Clasen 2023-10-20 19:51:05 -04:00
parent 98e883f9b4
commit aca02916ad

View File

@ -346,7 +346,7 @@ gdk_dmabuf_direct_downloader_do_download (GdkTexture *texture,
continue;
}
sizes[i] = lseek (dmabuf->planes[0].fd, 0, SEEK_END);
sizes[i] = lseek (dmabuf->planes[i].fd, 0, SEEK_END);
if (sizes[i] == (off_t) -1)
{
g_warning ("Failed to seek dmabuf: %s", g_strerror (errno));