aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-05-21 14:12:45 +0000
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2008-05-21 14:12:45 +0000
commit1b068b298488408e48b7a846e1f2e9dc2f2d2cad (patch)
tree4a5e842caad04060ab2ed18d2ec74de48bd81d43
parent392f227393f479ab9a461aba68ae4c6b6da685a4 (diff)
downloadffmpeg-1b068b298488408e48b7a846e1f2e9dc2f2d2cad.tar.gz
Let ffplay support "-version".
Patch by: Stefano Sabatini, stefano.sabatini-lala poste it Originally committed as revision 13208 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--doc/ffplay-doc.texi2
-rw-r--r--ffplay.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/ffplay-doc.texi b/doc/ffplay-doc.texi
index 19b0864e67..b4bbcc1f26 100644
--- a/doc/ffplay-doc.texi
+++ b/doc/ffplay-doc.texi
@@ -31,6 +31,8 @@ ffplay [options] @file{input_file}
@table @option
@item -h
show help
+@item -version
+show version
@item -x @var{width}
force displayed width
@item -y @var{height}
diff --git a/ffplay.c b/ffplay.c
index 6dea8763ca..d1842bdf58 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2438,8 +2438,15 @@ static void opt_show_help(void)
exit(0);
}
+static void opt_show_version(void)
+{
+ show_version(program_name);
+ exit(0);
+}
+
static const OptionDef options[] = {
{ "h", 0, {(void*)opt_show_help}, "show help" },
+ { "version", 0, {(void*)opt_show_version}, "show version" },
{ "x", HAS_ARG | OPT_FUNC2, {(void*)opt_width}, "force displayed width", "width" },
{ "y", HAS_ARG | OPT_FUNC2, {(void*)opt_height}, "force displayed height", "height" },
{ "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },