summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/v4l2_videodevice_test.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-17 01:33:58 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-19 17:14:21 +0200
commit6c34a2d386ac99d3732147fe65d0a2cb69ec3856 (patch)
tree26fa244902584e31f395e3261a4778755fcf48ae /test/v4l2_videodevice/v4l2_videodevice_test.cpp
parent6015d9702e2920644347d5f497c230f3a7133105 (diff)
libcamera: v4l2_videodevice: Make V4L2PixelFormat constructor explicit
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/v4l2_videodevice/v4l2_videodevice_test.cpp')
-rw-r--r--test/v4l2_videodevice/v4l2_videodevice_test.cpp2
1 files changed, 1 insertions, 1 deletions
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;