|
@@ -38,6 +38,7 @@ int rvc_videocap_get_device_count()
|
|
|
}
|
|
|
|
|
|
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)){
|
|
|
+ close(fd);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -66,6 +67,7 @@ int rvc_videocap_get_device_count()
|
|
|
|
|
|
tFmtDesc.index++;
|
|
|
}
|
|
|
+ close(fd);
|
|
|
}
|
|
|
}
|
|
|
return icount;
|
|
@@ -90,6 +92,7 @@ int rvc_videocap_get_device_name(int device_id, char* buf, int len)
|
|
|
}
|
|
|
|
|
|
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)){
|
|
|
+ close(fd);
|
|
|
return iret;
|
|
|
}
|
|
|
|
|
@@ -121,6 +124,7 @@ int rvc_videocap_get_device_name(int device_id, char* buf, int len)
|
|
|
snprintf(buf, len, "%s%s%s", cap.card, ";", cap.bus_info);
|
|
|
iret = 0;
|
|
|
}
|
|
|
+ close(fd);
|
|
|
}
|
|
|
return iret;
|
|
|
}
|
|
@@ -152,6 +156,7 @@ int rvc_videocap_get_device_info(int device_id, char* namebuf, int namelen, cha
|
|
|
|
|
|
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE))
|
|
|
{
|
|
|
+ close(fd);
|
|
|
return iret;
|
|
|
}
|
|
|
|
|
@@ -185,6 +190,7 @@ int rvc_videocap_get_device_info(int device_id, char* namebuf, int namelen, cha
|
|
|
snprintf(pathbuf, pathlen, "%s", cap.bus_info);
|
|
|
iret = 0;
|
|
|
}
|
|
|
+ close(fd);
|
|
|
}
|
|
|
return iret;
|
|
|
}
|
|
@@ -226,6 +232,7 @@ int rvc_videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int
|
|
|
|
|
|
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE))
|
|
|
{
|
|
|
+ close(fd);
|
|
|
return iret;
|
|
|
}
|
|
|
|
|
@@ -269,6 +276,7 @@ int rvc_videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int
|
|
|
iret = 0;
|
|
|
}
|
|
|
}
|
|
|
+ close(fd);
|
|
|
}
|
|
|
return iret;
|
|
|
}
|