Fix left open file descriptor in v4l2 plugin.
parent
9a37b2ce9c
commit
8a51431fdb
|
@ -249,7 +249,7 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings)
|
||||||
if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &video_cap) == -1) {
|
if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &video_cap) == -1) {
|
||||||
blog(LOG_INFO, "Failed to query capabilities for %s",
|
blog(LOG_INFO, "Failed to query capabilities for %s",
|
||||||
device.array);
|
device.array);
|
||||||
close(fd);
|
v4l2_close(fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings)
|
||||||
if (!(caps & V4L2_CAP_VIDEO_CAPTURE)) {
|
if (!(caps & V4L2_CAP_VIDEO_CAPTURE)) {
|
||||||
blog(LOG_INFO, "%s seems to not support video capture",
|
blog(LOG_INFO, "%s seems to not support video capture",
|
||||||
device.array);
|
device.array);
|
||||||
close(fd);
|
v4l2_close(fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings)
|
||||||
blog(LOG_INFO, "Found device '%s' at %s", video_cap.card,
|
blog(LOG_INFO, "Found device '%s' at %s", video_cap.card,
|
||||||
device.array);
|
device.array);
|
||||||
|
|
||||||
close(fd);
|
v4l2_close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(dirp);
|
closedir(dirp);
|
||||||
|
|
Loading…
Reference in New Issue