mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
vabase: Stop aligning VideoInfo during DMABUF import
Doing so resets the stride from the VideoMeta and it wasn't done before
the commit below. While on it, drop the plane size check as we can't
reliably predict the correct size when using DRM modifiers.
Fixes: 89b0a6fa23
("va: refactor buffer import")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7187>
This commit is contained in:
parent
b30a83ed5a
commit
f392e9b369
1 changed files with 2 additions and 7 deletions
|
@ -44,8 +44,6 @@ _try_import_dmabuf_unlocked (GstVaBufferImporter * importer, GstBuffer * inbuf)
|
|||
guint i, n_planes, usage_hint;
|
||||
gsize offset[GST_VIDEO_MAX_PLANES];
|
||||
uintptr_t fd[GST_VIDEO_MAX_PLANES];
|
||||
gsize plane_size[GST_VIDEO_MAX_PLANES];
|
||||
GstVideoAlignment align = { 0, };
|
||||
|
||||
/* This will eliminate most non-dmabuf out there */
|
||||
if (!gst_is_dmabuf_memory (gst_buffer_peek_memory (inbuf, 0)))
|
||||
|
@ -68,9 +66,6 @@ _try_import_dmabuf_unlocked (GstVaBufferImporter * importer, GstBuffer * inbuf)
|
|||
}
|
||||
}
|
||||
|
||||
if (!gst_video_info_align_full (&drm_info.vinfo, &align, plane_size))
|
||||
return FALSE;
|
||||
|
||||
/* Find and validate all memories */
|
||||
for (i = 0; i < n_planes; i++) {
|
||||
guint length;
|
||||
|
@ -78,8 +73,8 @@ _try_import_dmabuf_unlocked (GstVaBufferImporter * importer, GstBuffer * inbuf)
|
|||
gsize mem_skip;
|
||||
|
||||
if (!gst_buffer_find_memory (inbuf,
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&drm_info.vinfo, i), plane_size[i],
|
||||
&mem_idx, &length, &mem_skip))
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&drm_info.vinfo, i), 1, &mem_idx,
|
||||
&length, &mem_skip))
|
||||
return FALSE;
|
||||
|
||||
/* We can't have more then one dmabuf per plane */
|
||||
|
|
Loading…
Reference in a new issue