Optional width, height

This commit is contained in:
Kamil Trzcinski 2022-04-08 23:17:09 +02:00
parent bd9094cbbc
commit 1fd146d39f

View File

@ -94,7 +94,9 @@ retry:
if (buf_list->do_mplanes) {
fmt->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG;
if (width)
fmt->fmt.pix_mp.width = width;
if (height)
fmt->fmt.pix_mp.height = height;
if (format)
fmt->fmt.pix_mp.pixelformat = format;
@ -104,7 +106,9 @@ retry:
//fmt->fmt.pix_mp.plane_fmt[0].sizeimage = bytesperline * orig_height;
} else {
fmt->fmt.pix.colorspace = V4L2_COLORSPACE_RAW;
if (width)
fmt->fmt.pix.width = width;
if (height)
fmt->fmt.pix.height = height;
if (format)
fmt->fmt.pix.pixelformat = format;