From 3cf10f02a64214cd7831bb76e17f58257895dbf2 Mon Sep 17 00:00:00 2001 From: tux3 Date: Mon, 1 Jun 2015 22:07:22 +0200 Subject: [PATCH] Don't use tagged init --- src/platform/camera/v4l2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/platform/camera/v4l2.cpp b/src/platform/camera/v4l2.cpp index 4c537ee63..08c3bd135 100644 --- a/src/platform/camera/v4l2.cpp +++ b/src/platform/camera/v4l2.cpp @@ -46,7 +46,10 @@ fail: static QVector getDeviceModeFramerates(int fd, unsigned w, unsigned h, uint32_t pixelFormat) { QVector rates; - v4l2_frmivalenum vfve = { .pixel_format = pixelFormat, .height = h, .width = w }; + v4l2_frmivalenum vfve{}; + vfve.pixel_format = pixelFormat; + vfve.height = h; + vfve.width = w; while(!ioctl(fd, VIDIOC_ENUM_FRAMEINTERVALS, &vfve)) { int rate; @@ -75,12 +78,14 @@ QVector v4l2::getDeviceModes(QString devName) int fd = deviceOpen(devName); if (fd < 0) return modes; - v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; + v4l2_fmtdesc vfd{}; + vfd.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) { vfd.index++; - v4l2_frmsizeenum vfse = { .pixel_format = vfd.pixelformat }; + v4l2_frmsizeenum vfse{}; + vfse.pixel_format = vfd.pixelformat; while(!ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &vfse)) { VideoMode mode;