diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cuttime.c | 6 | ||||
-rw-r--r-- | src/overlap.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/cuttime.c b/src/cuttime.c index 4b1a494..29c8735 100644 --- a/src/cuttime.c +++ b/src/cuttime.c @@ -22,12 +22,13 @@ static void usage(void) { fprintf(stderr, - "cuttime [-adfs] FILE\n" + "cuttime [-adfhs] FILE\n" "\n" "OPTIONS\n" "\t-a\tcalculate average color of a frame\n" "\t-d\tcalculate difference betweenprev and next frame\n" "\t-f\tprint frame number\n" + "\t-h\tprint this help message\n" "\t-s\tsave frame from detected cut\n"); exit(EXIT_FAILURE); @@ -44,7 +45,7 @@ main(int argc, char **argv) double diff = 0.0, old_diff = 0.0; char filename[BUFSIZ]; - while ((ch = getopt(argc, argv, "adfs")) != -1) { + while ((ch = getopt(argc, argv, "adfsh")) != -1) { switch (ch) { case 'a': average_flag = 1; @@ -58,6 +59,7 @@ main(int argc, char **argv) case 's': showcut_flag = 1; break; + case 'h': default: usage(); /* NOTREACHED */ diff --git a/src/overlap.c b/src/overlap.c index 207a306..9af4e46 100644 --- a/src/overlap.c +++ b/src/overlap.c @@ -10,10 +10,11 @@ static void usage(void) { - fprintf(stderr, "overlap [OPTIONS] FIRST_VIDEO SECOND_VIDEO\n" + fprintf(stderr, "overlap [-dh] [-t DURATION] FIRST_VIDEO SECOND_VIDEO\n" "\n" "OPTIONS\n" "\t-d\tprint diff for every frame\n" + "\t-h\tprint this help message\n" "\t-t\tmax duration to find overlap in milliseconds\n" "\t\t(default 60000 = 1 min)\n"); @@ -34,7 +35,7 @@ main(int argc, char **argv) int64_t min_diff_time = 0; /* dts at overlaping frame */ double min_diff, diff = 0.0; - while ((ch = getopt(argc, argv, "dt")) != -1) { + while ((ch = getopt(argc, argv, "dth")) != -1) { switch (ch) { case 'd': diff_flag = 1; /* print diff of every frame */ @@ -42,6 +43,7 @@ main(int argc, char **argv) case 't': duration = strtol(optarg, NULL, 10); break; + case 'h': default: usage(); /* NOTREACHED */ |