mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
glupload: adjust memory offset calculation for dmabuf buffers
The data in the dmabuf fd may not start from byte 0, therefore we need to inform EGL about this additional offset. https://bugzilla.gnome.org/show_bug.cgi?id=779790
This commit is contained in:
parent
5e9ce3313f
commit
20d4aca0d4
1 changed files with 2 additions and 1 deletions
|
@ -652,7 +652,8 @@ _dma_buf_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
|
||||||
/* otherwise create one and cache it */
|
/* otherwise create one and cache it */
|
||||||
dmabuf->eglimage[i] =
|
dmabuf->eglimage[i] =
|
||||||
gst_egl_image_from_dmabuf (dmabuf->upload->context,
|
gst_egl_image_from_dmabuf (dmabuf->upload->context,
|
||||||
gst_dmabuf_memory_get_fd (mems[i]), in_info, i, mems_skip[i]);
|
gst_dmabuf_memory_get_fd (mems[i]), in_info, i,
|
||||||
|
mems[i]->offset + mems_skip[i]);
|
||||||
|
|
||||||
if (!dmabuf->eglimage[i])
|
if (!dmabuf->eglimage[i])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue