From 718f5e99a966246de8d129902ad470872652b749 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 16 Mar 2020 10:07:26 +0200 Subject: libcamera: PixelFormat: Make constructor explicit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To achieve the goal of preventing unwanted conversion between a DRM and a V4L2 FourCC, make the PixelFormat constructor that takes an integer value explicit. All users of pixel formats flagged by the compiler are fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Niklas Söderlund --- test/v4l2_videodevice/buffer_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/v4l2_videodevice') diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp index e6edd2fa..d730e755 100644 --- a/test/v4l2_videodevice/buffer_cache.cpp +++ b/test/v4l2_videodevice/buffer_cache.cpp @@ -142,7 +142,7 @@ public: const unsigned int numBuffers = 8; StreamConfiguration cfg; - cfg.pixelFormat = DRM_FORMAT_YUYV; + cfg.pixelFormat = PixelFormat(DRM_FORMAT_YUYV); cfg.size = Size(600, 800); cfg.bufferCount = numBuffers; -- cgit v1.2.1