From 6c34a2d386ac99d3732147fe65d0a2cb69ec3856 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 17 Mar 2020 01:33:58 +0200 Subject: libcamera: v4l2_videodevice: Make V4L2PixelFormat 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 V4L2PixelFormat constructor that takes an integer value explicit. All users of V4L2 pixel formats flagged by the compiler are fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- test/v4l2_videodevice/v4l2_videodevice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/v4l2_videodevice') diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp index 577da4cb..93b9e72d 100644 --- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp @@ -69,7 +69,7 @@ int V4L2VideoDeviceTest::init() if (debayer_->open()) return TestFail; - format.fourcc = V4L2_PIX_FMT_SBGGR8; + format.fourcc = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8); V4L2SubdeviceFormat subformat = {}; subformat.mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8; -- cgit v1.2.1