summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffprobe.c b/ffprobe.c
index b5d19f06d6..508800e8d2 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -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, },
};