diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-07-14 18:30:23 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-20 20:47:46 +0200 |
commit | be49c48282704ada90d2130c8c5193bb97a7cfaa (patch) | |
tree | 04b12d373b7e0008b06fcec17cf91aeb98046e79 /fftools | |
parent | 411e1833601e542b28681feab23ef4754644eb47 (diff) | |
download | ffmpeg-be49c48282704ada90d2130c8c5193bb97a7cfaa.tar.gz |
fftools/ffprobe: inline opt_output_file() into its only caller
There is no reason to keep them separate.
Also, replace exit_program() with returning an error code.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffprobe.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 6180a5c952..e234c92904 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3795,22 +3795,18 @@ static int opt_input_file_i(void *optctx, const char *opt, const char *arg) return 0; } -static void opt_output_file(void *optctx, const char *arg) +static int opt_output_file_o(void *optctx, const char *opt, const char *arg) { if (output_filename) { av_log(NULL, AV_LOG_ERROR, "Argument '%s' provided as output filename, but '%s' was already specified.\n", arg, output_filename); - exit_program(1); + return AVERROR(EINVAL); } if (!strcmp(arg, "-")) arg = "fd:"; output_filename = arg; -} -static int opt_output_file_o(void *optctx, const char *opt, const char *arg) -{ - opt_output_file(optctx, arg); return 0; } |