diff options
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -326,13 +326,14 @@ static void show_usage(void) printf("\n"); } -static void opt_format(const char *arg) +static int opt_format(const char *opt, const char *arg) { iformat = av_find_input_format(arg); if (!iformat) { fprintf(stderr, "Unknown input format: %s\n", arg); - exit(1); + return AVERROR(EINVAL); } + return 0; } static void opt_input_file(const char *arg) @@ -379,7 +380,7 @@ static const OptionDef options[] = { { "show_format", OPT_BOOL, {(void*)&do_show_format} , "show format/container info" }, { "show_packets", OPT_BOOL, {(void*)&do_show_packets}, "show packets info" }, { "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" }, - { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, + { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, { NULL, }, }; |