Skip to content

Instantly share code, notes, and snippets.

@brandt
Created September 13, 2013 08:38
Show Gist options
  • Save brandt/6548139 to your computer and use it in GitHub Desktop.
Save brandt/6548139 to your computer and use it in GitHub Desktop.
Patch to fix conflicting uses of the '-t' option
diff --git c/src/main.cc w/src/main.cc
index ee16e7b..d60ce98 100644
--- c/src/main.cc
+++ w/src/main.cc
@@ -42,21 +42,23 @@ bool ShotApp::OnInit () {
void show_help (char **argv) {
printf ("\nShotdetect version \"%s\", Copyright (c) 2007-2013 Johan Mathe\n\n"
"Usage: %s \n"
- "-h : show this help\n"
- "-n : commandline mode (disable GUI)\n"
- "-s threshold : threshold (Default=%d)\n"
- "-i file : input file path\n"
- "-o path : output path\n"
- "-y year : set the year\n"
"-a id : id of the movie\n"
- "-x xsl path : path of the xsl stylesheet\n"
- "-w : generate xml of audio\n"
- "-v : generate xml of video infos\n"
+ "-c : print timecode on x-axis in graph\n"
"-f : generate first image for each shot\n"
+ "-h : show this help\n"
+ "-i file : input file path\n"
"-l : generate last image for each shot\n"
"-m : generate the thumbnail image\n"
+ "-n : command-line mode (disable GUI)\n"
+ "-o path : output path\n"
"-r : generate the images in native resolution\n"
- "-c : print timecode on x-axis in graph\n",
+ "-s threshold : threshold (Default=%d)\n"
+ "-t title : set the title\n"
+ "-T : embed timecode in graph\n"
+ "-v : generate xml of video infos\n"
+ "-w : generate xml of audio\n"
+ "-x xsl path : path of the xsl stylesheet\n"
+ "-y year : set the year\n",
g_APP_VERSION,
argv[0],
DEFAULT_THRESHOLD
@@ -82,7 +84,7 @@ int main (int argc, char **argv) {
f.threshold=DEFAULT_THRESHOLD;
for (;;) {
- int c = getopt (argc, argv, "?hnt:y:i:o:a:x:s:flwvmrc");
+ int c = getopt (argc, argv, "?hnt:y:i:o:a:x:s:fTlwvmrc");
if (c < 0) {
break;
@@ -130,8 +132,13 @@ int main (int argc, char **argv) {
f.set_threshold(atoi (optarg));
break;
- /* Embed timecode in graph */
+ /* Set the title */
case 't':
+ f.set_title(optarg);
+ break;
+
+ /* Embed timecode in graph */
+ case 'T':
f.set_show_timecode(true);
break;
@@ -147,11 +154,6 @@ int main (int argc, char **argv) {
xsl_path_set = true;
break;
- /* Set the title */
- case 't':
- f.set_title(optarg);
- break;
-
/* Set the year */
case 'y':
f.set_year(atoi (optarg));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment