fftools/cmdutils: return error codes from setup_find_stream_info_opts() instead of aborting

This commit is contained in:
Anton Khirnov 2023-07-13 15:11:07 +02:00
parent 13ebc9a0a9
commit 37abb3a419
5 changed files with 39 additions and 17 deletions

View file

@ -3372,9 +3372,13 @@ static int open_input_file(InputFile *ifile, const char *filename,
av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
if (find_stream_info) {
AVDictionary **opts = setup_find_stream_info_opts(fmt_ctx, codec_opts);
AVDictionary **opts;
int orig_nb_streams = fmt_ctx->nb_streams;
err = setup_find_stream_info_opts(fmt_ctx, codec_opts, &opts);
if (err < 0)
report_and_exit(err);
err = avformat_find_stream_info(fmt_ctx, opts);
for (i = 0; i < orig_nb_streams; i++)