diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-10-05 15:46:20 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-10-05 16:19:15 -0400 |
commit | 2057a36d04e8444911a1264fffcb6d8f8cba3f7c (patch) | |
tree | 5bcf8ac1f6be8537080c1e8244add54eb44ef6a7 /sys/kms/gstkmsallocator.c | |
parent | 922031b0f98bf5c7b01f4431d1c08617f65865f7 (diff) |
kmsallocator: Update GstVideoInfo.size when extrapolating
When we guess the strides, we need to also update the GstVideoInfo.size
otherwise the memory size will be set to something smaller then needed.
This was causing crash with the DMABuf exportation, since we would not
mmap() a large enough buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=787593
Diffstat (limited to 'sys/kms/gstkmsallocator.c')
-rw-r--r-- | sys/kms/gstkmsallocator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kms/gstkmsallocator.c b/sys/kms/gstkmsallocator.c index dd5f230d1..4118e17f1 100644 --- a/sys/kms/gstkmsallocator.c +++ b/sys/kms/gstkmsallocator.c @@ -213,6 +213,9 @@ gst_kms_allocator_memory_create (GstKMSAllocator * allocator, GST_VIDEO_INFO_PLANE_OFFSET (vinfo, i)); } + /* Update with the size use for display, excluding any padding at the end */ + GST_VIDEO_INFO_SIZE (vinfo) = offs; + done: kmsmem->bo->handle = arg.handle; /* will be used a memory maxsize */ |