ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i "file...
authorBenjamin Larsson <benjamin@southpole.se>
Tue, 8 Mar 2011 14:29:46 +0000 (15:29 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 11 May 2011 05:32:36 +0000 (07:32 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
cmdutils.c
ffplay.c

index f957788..feeea69 100644 (file)
@@ -281,8 +281,8 @@ unknown_opt:
                     fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
                     exit(1);
                 }
                     fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
                     exit(1);
                 }
-            } else {
-                po->u.func_arg(arg);
+            } else if (po->u.func_arg) {
+                    po->u.func_arg(arg);
             }
             if(po->flags & OPT_EXIT)
                 exit(0);
             }
             if(po->flags & OPT_EXIT)
                 exit(0);
index 11b307e..07727b6 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -3019,6 +3019,7 @@ static const OptionDef options[] = {
 #endif
     { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, {(void*)&rdftspeed}, "rdft speed", "msecs" },
     { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
 #endif
     { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, {(void*)&rdftspeed}, "rdft speed", "msecs" },
     { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
+    { "i", 0, {NULL}, "ffmpeg compatibility dummy option", ""},
     { NULL, },
 };
 
     { NULL, },
 };