aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-30 12:30:51 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-30 12:30:51 +0000
commit242f5b0a880713463d206c59c78ea8593dc90965 (patch)
tree7d882d488d1565e0ae265cdf911892c158fc9470
parent844ce49d127c45b848557b57734d18b4c8878f3e (diff)
downloadffmpeg-242f5b0a880713463d206c59c78ea8593dc90965.tar.gz
ffmpeg -version
Originally committed as revision 3091 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index f74ae775fe..2698c084c7 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3435,10 +3435,20 @@ static void opt_target(const char *arg)
}
}
+static void show_version(void)
+{
+ printf("ffmpeg " FFMPEG_VERSION "\n"
+ "libavcodec %d\n"
+ "libavformat %d\n",
+ avcodec_build(), LIBAVFORMAT_BUILD);
+ exit(1);
+}
+
const OptionDef options[] = {
/* main options */
{ "L", 0, {(void*)show_license}, "show license" },
{ "h", 0, {(void*)show_help}, "show help" },
+ { "version", 0, {(void*)show_version}, "show version" },
{ "formats", 0, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
{ "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" },
{ "img", HAS_ARG, {(void*)opt_image_format}, "force image format", "img_fmt" },