summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-30 15:21:32 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-30 15:21:32 +0200
commitb7cb1af4980e4ec2da117c0bf29d83eaec5c58f3 (patch)
tree80d62880e4ab276e360e9c2f2992289a9ecddeeb
parent66431309dccf8af0441407bf53e9be3cbcdf6c27 (diff)
Make -c and -F options accept an optional argument
The long --capture and --file options have an optional argument, fix the short versions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--yavta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/yavta.c b/yavta.c
index ebb94b8..123f42f 100644
--- a/yavta.c
+++ b/yavta.c
@@ -845,7 +845,7 @@ static void usage(const char *argv0)
printf("-c, --capture[=nframes] Capture frames\n");
printf("-d, --delay Delay (in ms) before requeuing buffers\n");
printf("-f, --format format Set the video format\n");
- printf("-F, --file prefix Read/write frames from/to disk\n");
+ printf("-F, --file[=prefix] Read/write frames from/to disk\n");
printf("-h, --help Show this help screen\n");
printf("-i, --input input Select the video input\n");
printf("-l, --list-controls List available controls\n");
@@ -934,7 +934,7 @@ int main(int argc, char *argv[])
const char *filename = "frame";
opterr = 0;
- while ((c = getopt_long(argc, argv, "cd:f:Fhi:ln:pq:r:s:t:uw:", opts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "c::d:f:F::hi:ln:pq:r:s:t:uw:", opts, NULL)) != -1) {
switch (c) {
case 'c':