[Bugfix] V4L2 used screen resolution for fallback

https://hyperion-project.org/threads/ng-hyperion-v4l2-capture-resolution-issue.3684/#post-15959
This commit is contained in:
Paulchen Panther 2019-08-28 22:20:49 +02:00 committed by GitHub
parent b1fa085d64
commit 782d44b81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -617,8 +617,16 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
}
// set the settings
if (max_width != 0 || max_height != 0)
{
fmt.fmt.pix.width = max_width;
fmt.fmt.pix.height = max_height;
}
else
{
fmt.fmt.pix.width = _width;
fmt.fmt.pix.height = _height;
}
if (-1 == xioctl(VIDIOC_S_FMT, &fmt))
{