[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't move planes to construct FrameBuffer

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Sep 23 13:55:58 CEST 2021


The FrameBuffer class has no constructor that takes an rvalue reference
to planes. The std::move() is thus misleading as a copy will still take
place. Drop it to clarify the code, no functional change is introduced.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/libcamera/v4l2_videodevice.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 9b3ee88757be..ba5f88cd41ed 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1376,7 +1376,7 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)
 		}
 	}
 
-	return std::make_unique<FrameBuffer>(std::move(planes));
+	return std::make_unique<FrameBuffer>(planes);
 }
 
 FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index,

base-commit: 2cc4303b172a76ac5b431c4fb4df8a083f7d3fcf
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list