Re: [PATCH v4 1/8] v4l2-ctl: Add routing and streams support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux