[FFmpeg-cvslog] ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i "file " and ffplay -i "file".

Benjamin Larsson git at videolan.org
Thu May 12 04:55:07 CEST 2011


ffmpeg | branch: master | Benjamin Larsson <benjamin at southpole.se> | Tue Mar  8 15:29:46 2011 +0100| [91199cfe55b1398b23a16b1f55df75e62e05198b] | committer: Anton Khirnov

ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i "file" and ffplay -i "file".

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91199cfe55b1398b23a16b1f55df75e62e05198b
---

 cmdutils.c |    4 ++--
 ffplay.c   |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index f957788..feeea69 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -281,8 +281,8 @@ unknown_opt:
                     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);
diff --git a/ffplay.c b/ffplay.c
index 11b307e..07727b6 100644
--- 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", "" },
+    { "i", 0, {NULL}, "ffmpeg compatibility dummy option", ""},
     { NULL, },
 };
 



More information about the ffmpeg-cvslog mailing list