On 24/04/2023 10:04, Laurent Pinchart wrote:
+ r = (v4l2_subdev_route *)routing.routes;
+ ref = end = strdup(optarg);
+ while ((tok = strsep(&end, ",")) != NULL) {
+ if (sscanf(tok, "%u/%u -> %u/%u [%u]",
+ &r->sink_pad, &r->sink_stream,
+ &r->source_pad, &r->source_stream,
+ &flags) != 5) {
Requiring a space around '->' isn't nice, especially as it's not present
in the help text. MC link parsing makes spaces optional, please do the
same here.
The space are not required. sscanf skips white-space, so this parses
fine "1/2->3/4[1]".
Tomi