Commit 242f5b0a authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg -version

Originally committed as revision 3091 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 844ce49d
...@@ -3435,10 +3435,20 @@ static void opt_target(const char *arg) ...@@ -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[] = { const OptionDef options[] = {
/* main options */ /* main options */
{ "L", 0, {(void*)show_license}, "show license" }, { "L", 0, {(void*)show_license}, "show license" },
{ "h", 0, {(void*)show_help}, "show help" }, { "h", 0, {(void*)show_help}, "show help" },
{ "version", 0, {(void*)show_version}, "show version" },
{ "formats", 0, {(void*)show_formats}, "show available formats, codecs, protocols, ..." }, { "formats", 0, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
{ "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" }, { "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" },
{ "img", HAS_ARG, {(void*)opt_image_format}, "force image format", "img_fmt" }, { "img", HAS_ARG, {(void*)opt_image_format}, "force image format", "img_fmt" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment