diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2017-03-13 16:06:53 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2017-03-14 17:07:41 +0200 |
commit | 4757ec88604835b5e3b6ce32ba6ddb5e6b6611b4 (patch) | |
tree | c61697e07ee033a469c5624c391911287996e6cb /sys | |
parent | 20d4aca0d44b83347c12c24e770a5b578afcfc20 (diff) | |
download | gstreamer-plugins-bad-4757ec88604835b5e3b6ce32ba6ddb5e6b6611b4.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kms/gstkmssink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c index 2f05c633d..8ddb6e104 100644 --- a/sys/kms/gstkmssink.c +++ b/sys/kms/gstkmssink.c @@ -1090,6 +1090,10 @@ gst_kms_sink_import_dmabuf (GstKMSSink * self, GstBuffer * inbuf, 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 */ if (!gst_is_dmabuf_memory (mems[i])) return FALSE; |