mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
vaallocator: fix assumption object size equal fd size
Remove the comment and warning message that object size should be equal to the file descriptor size. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5264>
This commit is contained in:
parent
169e38cbe6
commit
2d358cb22a
1 changed files with 4 additions and 4 deletions
|
@ -704,14 +704,14 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator,
|
||||||
|
|
||||||
for (i = 0; i < desc.num_objects; i++) {
|
for (i = 0; i < desc.num_objects; i++) {
|
||||||
gint fd = desc.objects[i].fd;
|
gint fd = desc.objects[i].fd;
|
||||||
/* don't rely on prime descriptor reported size since gallium drivers report
|
/* prime descriptor reports the total size of the object, including regions
|
||||||
* different values */
|
* which aren't part surface's space. Let's just grab the surface's size: */
|
||||||
gsize size = _get_fd_size (fd);
|
gsize size = _get_fd_size (fd);
|
||||||
GstMemory *mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
|
GstMemory *mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
|
||||||
|
|
||||||
if (size != desc.objects[i].size) {
|
if (desc.objects[i].size < size) {
|
||||||
GST_WARNING_OBJECT (self, "driver bug: fd size (%" G_GSIZE_FORMAT
|
GST_WARNING_OBJECT (self, "driver bug: fd size (%" G_GSIZE_FORMAT
|
||||||
") differs from object descriptor size (%" G_GUINT32_FORMAT ")",
|
") is bigger than object descriptor size (%" G_GUINT32_FORMAT ")",
|
||||||
size, desc.objects[i].size);
|
size, desc.objects[i].size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue