mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
kmssink: adjust memory offset calculation for dmabuf buffers
The data in the dmabuf fd may not start from byte 0, therefore we need to inform DRM about this additional offset. https://bugzilla.gnome.org/show_bug.cgi?id=779790
This commit is contained in:
parent
20d4aca0d4
commit
4757ec8860
1 changed files with 4 additions and 0 deletions
|
@ -1090,6 +1090,10 @@ gst_kms_sink_import_dmabuf (GstKMSSink * self, GstBuffer * inbuf,
|
||||||
|
|
||||||
mems[i] = gst_buffer_peek_memory (inbuf, mems_idx[i]);
|
mems[i] = gst_buffer_peek_memory (inbuf, mems_idx[i]);
|
||||||
|
|
||||||
|
/* adjust for memory offset, in case data does not
|
||||||
|
* start from byte 0 in the dmabuf fd */
|
||||||
|
mems_skip[i] += mems[i]->offset;
|
||||||
|
|
||||||
/* And all memory found must be dmabuf */
|
/* And all memory found must be dmabuf */
|
||||||
if (!gst_is_dmabuf_memory (mems[i]))
|
if (!gst_is_dmabuf_memory (mems[i]))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue