* [v4l-utils PATCH 1/1] libv4l2subdev: Allow extra spaces between format strings
@ 2016-03-11 20:43 Sakari Ailus
2016-03-17 11:48 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2016-03-11 20:43 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart
It's possible to pass more than one format string (and entity) to
v4l2_subdev_parse_setup_formats(), yet v4l2_subdev_parse_pad_format() does
not parse the string until the next non-space character.
v4l2_subdev_parse_setup_formats() expects to find a comma right after that
leading spaces before the comma to produce an error.
Seek until no spaces are seen.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
utils/media-ctl/libv4l2subdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 1f5fca4..3dcf943 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -723,6 +723,7 @@ int v4l2_subdev_parse_setup_formats(struct media_device *media, const char *p)
if (ret < 0)
return ret;
+ for (; isspace(*end); end++);
p = end + 1;
} while (*end == ',');
--
2.1.0.231.g7484e3b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v4l-utils PATCH 1/1] libv4l2subdev: Allow extra spaces between format strings
2016-03-11 20:43 [v4l-utils PATCH 1/1] libv4l2subdev: Allow extra spaces between format strings Sakari Ailus
@ 2016-03-17 11:48 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2016-03-17 11:48 UTC (permalink / raw)
To: Sakari Ailus; +Cc: linux-media
Hi Sakari,
Thank you for the patch.
On Friday 11 March 2016 22:43:18 Sakari Ailus wrote:
> It's possible to pass more than one format string (and entity) to
> v4l2_subdev_parse_setup_formats(), yet v4l2_subdev_parse_pad_format() does
> not parse the string until the next non-space character.
> v4l2_subdev_parse_setup_formats() expects to find a comma right after that
> leading spaces before the comma to produce an error.
>
> Seek until no spaces are seen.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> utils/media-ctl/libv4l2subdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/utils/media-ctl/libv4l2subdev.c
> b/utils/media-ctl/libv4l2subdev.c index 1f5fca4..3dcf943 100644
> --- a/utils/media-ctl/libv4l2subdev.c
> +++ b/utils/media-ctl/libv4l2subdev.c
> @@ -723,6 +723,7 @@ int v4l2_subdev_parse_setup_formats(struct media_device
> *media, const char *p) if (ret < 0)
> return ret;
>
> + for (; isspace(*end); end++);
> p = end + 1;
> } while (*end == ',');
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-17 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 20:43 [v4l-utils PATCH 1/1] libv4l2subdev: Allow extra spaces between format strings Sakari Ailus
2016-03-17 11:48 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).