mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 20:10:09 +01:00
Get rid of more senseless wrapper functions and use OPT_EXIT instead.
Originally committed as revision 13233 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
8
ffmpeg.c
8
ffmpeg.c
@@ -3756,17 +3756,11 @@ static int opt_bsf(const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_show_version(void)
|
|
||||||
{
|
|
||||||
show_version();
|
|
||||||
av_exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
/* main options */
|
/* main options */
|
||||||
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
|
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
|
||||||
{ "h", OPT_EXIT, {(void*)show_help}, "show help" },
|
{ "h", OPT_EXIT, {(void*)show_help}, "show help" },
|
||||||
{ "version", 0, {(void*)opt_show_version}, "show version" },
|
{ "version", OPT_EXIT, {(void*)show_version}, "show version" },
|
||||||
{ "formats", OPT_EXIT, {(void*)opt_show_formats}, "show available formats, codecs, protocols, ..." },
|
{ "formats", OPT_EXIT, {(void*)opt_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" },
|
||||||
{ "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" },
|
{ "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" },
|
||||||
|
|||||||
16
ffplay.c
16
ffplay.c
@@ -2432,21 +2432,9 @@ static int opt_thread_count(const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_show_help(void)
|
|
||||||
{
|
|
||||||
show_help();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void opt_show_version(void)
|
|
||||||
{
|
|
||||||
show_version();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
{ "h", 0, {(void*)opt_show_help}, "show help" },
|
{ "h", OPT_EXIT, {(void*)show_help}, "show help" },
|
||||||
{ "version", 0, {(void*)opt_show_version}, "show version" },
|
{ "version", OPT_EXIT, {(void*)show_version}, "show version" },
|
||||||
{ "x", HAS_ARG | OPT_FUNC2, {(void*)opt_width}, "force displayed width", "width" },
|
{ "x", HAS_ARG | OPT_FUNC2, {(void*)opt_width}, "force displayed width", "width" },
|
||||||
{ "y", HAS_ARG | OPT_FUNC2, {(void*)opt_height}, "force displayed height", "height" },
|
{ "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" },
|
{ "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },
|
||||||
|
|||||||
11
ffserver.c
11
ffserver.c
@@ -4333,12 +4333,6 @@ static void handle_child_exit(int sig)
|
|||||||
need_to_start_children = 1;
|
need_to_start_children = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opt_show_license(void)
|
|
||||||
{
|
|
||||||
show_license();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void opt_debug()
|
static void opt_debug()
|
||||||
{
|
{
|
||||||
ffserver_debug = 1;
|
ffserver_debug = 1;
|
||||||
@@ -4351,12 +4345,11 @@ static void opt_show_help(void)
|
|||||||
"Hyper fast multi format Audio/Video streaming server\n");
|
"Hyper fast multi format Audio/Video streaming server\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
show_help_options(options, "Main options:\n", 0, 0);
|
show_help_options(options, "Main options:\n", 0, 0);
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const OptionDef options[] = {
|
static const OptionDef options[] = {
|
||||||
{ "h", 0, {(void*)opt_show_help}, "show help" },
|
{ "h", OPT_EXIT, {(void*)opt_show_help}, "show help" },
|
||||||
{ "L", 0, {(void*)opt_show_license}, "show license" },
|
{ "L", OPT_EXIT, {(void*)show_license}, "show license" },
|
||||||
{ "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" },
|
{ "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" },
|
||||||
{ "d", 0, {(void*)opt_debug}, "enable debug mode" },
|
{ "d", 0, {(void*)opt_debug}, "enable debug mode" },
|
||||||
{ "f", HAS_ARG | OPT_STRING, {(void*)&config_filename }, "use configfile instead of /etc/ffserver.conf", "configfile" },
|
{ "f", HAS_ARG | OPT_STRING, {(void*)&config_filename }, "use configfile instead of /etc/ffserver.conf", "configfile" },
|
||||||
|
|||||||
Reference in New Issue
Block a user