summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2021-07-09 16:54:19 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2021-07-19 18:41:08 +0530
commitab09913acbb0c00a74ff6498fa9b52f8d74548fa (patch)
tree8fe1dc5bf93ed38f09b2390e2b7b572a4aa3cdc7 /src
parentc73170388e3aeea6edb0df9f828967a7204d75fa (diff)
libcamera: v4l2_videodevice: Avoid extra construction of Framebuffer
While populating the V4L2BufferCache, avoid the extra construction of FrameBuffer, which is currently done by passing the vector of FrameBuffer::Planes. It is not wrong per se, but futile to have another construction of FrameBuffer from a copy of buffer->planes() for the corresponding Entry. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 3d2d99b4..da2af6a1 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -183,7 +183,7 @@ V4L2BufferCache::V4L2BufferCache(const std::vector<std::unique_ptr<FrameBuffer>>
for (const std::unique_ptr<FrameBuffer> &buffer : buffers)
cache_.emplace_back(true,
lastUsedCounter_.fetch_add(1, std::memory_order_acq_rel),
- buffer->planes());
+ *buffer.get());
}
V4L2BufferCache::~V4L2BufferCache()