From 8a51431fdb04446e492e7412abbc5dcd682031af Mon Sep 17 00:00:00 2001 From: fryshorts Date: Tue, 14 Oct 2014 23:48:59 +0200 Subject: [PATCH] Fix left open file descriptor in v4l2 plugin. --- plugins/linux-v4l2/v4l2-input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/linux-v4l2/v4l2-input.c b/plugins/linux-v4l2/v4l2-input.c index 0e6b995dc..88155db9d 100644 --- a/plugins/linux-v4l2/v4l2-input.c +++ b/plugins/linux-v4l2/v4l2-input.c @@ -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) { blog(LOG_INFO, "Failed to query capabilities for %s", device.array); - close(fd); + v4l2_close(fd); continue; } @@ -260,7 +260,7 @@ static void v4l2_device_list(obs_property_t *prop, obs_data_t *settings) if (!(caps & V4L2_CAP_VIDEO_CAPTURE)) { blog(LOG_INFO, "%s seems to not support video capture", device.array); - close(fd); + v4l2_close(fd); 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, device.array); - close(fd); + v4l2_close(fd); } closedir(dirp);