mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
kmssink: do not get kms bo pitch for planar formats
The API is ill defined for planar formats in case of dumb BOs, do not use the reported stride in those cases. https://bugzilla.gnome.org/show_bug.cgi?id=773473
This commit is contained in:
parent
b52c39e1c7
commit
4f19d5d20a
1 changed files with 6 additions and 2 deletions
|
@ -320,8 +320,12 @@ gst_kms_allocator_add_fb (GstKMSAllocator * alloc, GstKMSMemory * kmsmem,
|
|||
bo_handles[i] = bo_handles[0];
|
||||
|
||||
/* Get the bo pitch calculated by the kms driver.
|
||||
* If it's defined, it will overwrite the video info's stride */
|
||||
kms_bo_get_prop (kmsmem->bo, KMS_PITCH, &pitch);
|
||||
* If it's defined, it will overwrite the video info's stride.
|
||||
* Since the API is completely undefined for planar formats,
|
||||
* only do this for interleaved formats.
|
||||
*/
|
||||
if (num_planes == 1)
|
||||
kms_bo_get_prop (kmsmem->bo, KMS_PITCH, &pitch);
|
||||
} else {
|
||||
for (i = 0; i < num_planes; i++)
|
||||
bo_handles[i] = kmsmem->gem_handle[i];
|
||||
|
|
Loading…
Reference in a new issue