You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-06 06:27:36 +02:00
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.
This commit is contained in:
@ -4032,7 +4032,7 @@ int main(int argc, char **argv)
|
|||||||
WriterContext *wctx;
|
WriterContext *wctx;
|
||||||
char *buf;
|
char *buf;
|
||||||
char *w_name = NULL, *w_args = NULL;
|
char *w_name = NULL, *w_args = NULL;
|
||||||
int ret, i;
|
int ret, input_ret, i;
|
||||||
|
|
||||||
init_dynload();
|
init_dynload();
|
||||||
|
|
||||||
@ -4156,10 +4156,14 @@ int main(int argc, char **argv)
|
|||||||
show_error(wctx, ret);
|
show_error(wctx, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input_ret = ret;
|
||||||
|
|
||||||
writer_print_section_footer(wctx);
|
writer_print_section_footer(wctx);
|
||||||
ret = writer_close(&wctx);
|
ret = writer_close(&wctx);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret));
|
av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret));
|
||||||
|
|
||||||
|
ret = FFMIN(ret, input_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
Reference in New Issue
Block a user