main.c: allow spaces in format definition
authorTodor Tomov <ttomov@mm-sol.com>
Wed, 19 Jan 2011 15:03:37 +0000 (17:03 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 19 Jan 2011 16:30:37 +0000 (17:30 +0100)
Allow spaces after '[' in format definition.
Example:
media-ctl -f '"OMAP3 ISP resizer":1[ UYVY 864x480]'

Signed-off-by: Todor Tomov <ttomov@mm-sol.com>
main.c

diff --git a/main.c b/main.c
index 9952a60..d156d2a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -272,6 +272,8 @@ static struct media_entity_pad *parse_pad_format(struct media_device *media,
        if (*p++ != '[')
                return NULL;
 
+       for (; isspace(*p); ++p);
+
        if (isalnum(*p)) {
                ret = parse_format(format, p, &end);
                if (ret < 0)