diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2022-08-15 23:56:16 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2022-08-17 16:46:05 +0530 |
commit | d5544f6457ad06987311beda0e4b7c08bf52915c (patch) | |
tree | 9a0800c90f00e0f140b5e6a853483d3e75642016 /fftools | |
parent | 444d80bd872e9dd718592173c23c88b3432bd53d (diff) | |
download | ffmpeg-d5544f6457ad06987311beda0e4b7c08bf52915c.tar.gz |
ffprobe: restore reporting error code for failed inputs
c11fb46731 led to a regression whereby the return code for missing
input or input probe is overridden by writer close return code and
hence not conveyed in the exit code.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffprobe.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ad633ccc44..8983dc28cc 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -4032,7 +4032,7 @@ int main(int argc, char **argv) WriterContext *wctx; char *buf; char *w_name = NULL, *w_args = NULL; - int ret, i; + int ret, input_ret, i; init_dynload(); @@ -4156,10 +4156,14 @@ int main(int argc, char **argv) show_error(wctx, ret); } + input_ret = ret; + writer_print_section_footer(wctx); ret = writer_close(&wctx); if (ret < 0) av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret)); + + ret = FFMIN(ret, input_ret); } end: |