File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ namespace timelapse {
162
162
frmsize.pixel_format = fmt.pixelformat ;
163
163
frmsize.index = 0 ;
164
164
while (v4l2_ioctl (fd, VIDIOC_ENUM_FRAMESIZES, &frmsize) >= 0 ) {
165
- uint32_t w;
166
- uint32_t h;
165
+ uint32_t w = 0 ;
166
+ uint32_t h = 0 ;
167
167
if (frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) {
168
168
w = frmsize.discrete .width ;
169
169
h = frmsize.discrete .height ;
@@ -172,7 +172,10 @@ namespace timelapse {
172
172
h = frmsize.stepwise .max_height ;
173
173
}
174
174
175
- if ((w > v4lfmt.fmt .pix .width && h > v4lfmt.fmt .pix .height && fmt.pixelformat == V4L2_PIX_FMT_RGB24)) {
175
+ if (w > v4lfmt.fmt .pix .width &&
176
+ h > v4lfmt.fmt .pix .height &&
177
+ fmt.pixelformat == V4L2_PIX_FMT_RGB24) {
178
+
176
179
v4lfmt.fmt .pix .width = w;
177
180
v4lfmt.fmt .pix .height = h;
178
181
v4lfmt.fmt .pix .pixelformat = fmt.pixelformat ;
You can’t perform that action at this time.
0 commit comments