On 4/4/21 3:44 PM, Trenton Schulz wrote:
+#else // Not Linux + int fd = open(device, O_RDONLY); + if (fd >= 0) { + struct v4l2_capability caps; + if (ioctl(fd, VIDIOC_QUERYCAP, &caps) == 0) {
Hi,You should close the "fd" before all returns, in this function. Else it might leak.
int error; error = ioctl(fd ...); close(fd); if (error == 0) { ... --HPS