mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +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++) {
|
||||
gint fd = desc.objects[i].fd;
|
||||
/* don't rely on prime descriptor reported size since gallium drivers report
|
||||
* different values */
|
||||
/* prime descriptor reports the total size of the object, including regions
|
||||
* which aren't part surface's space. Let's just grab the surface's size: */
|
||||
gsize size = _get_fd_size (fd);
|
||||
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
|
||||
") differs from object descriptor size (%" G_GUINT32_FORMAT ")",
|
||||
") is bigger than object descriptor size (%" G_GUINT32_FORMAT ")",
|
||||
size, desc.objects[i].size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue