You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
620 B

--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
static bool parse_next_subopt(char **subs, char **value)
{
- static char *const subopts[] = {
- NULL
- };
- int opt = getsubopt(subs, subopts, value);
+ char *stmp = *subs;
+ *value = NULL;
- if (opt < 0 || *value)
+ if (*subs) {
+ *subs = strchr(stmp, ',');
+ if (*subs)
+ *(*subs)++ = 0;
+ else *subs = stmp + strlen(stmp);
+
+ *value = stmp;
return false;
- fprintf(stderr, "No value given to suboption <%s>\n",
- subopts[opt]);
+ }
return true;
}