fftools/ffmpeg: return an error from assert_avoptions() instead of aborting

Rename it to check_avoptions().
This commit is contained in:
Anton Khirnov
2023-07-14 18:18:57 +02:00
parent eda1fac27a
commit 2f155b18a1
5 changed files with 17 additions and 6 deletions

View File

@@ -457,13 +457,15 @@ void remove_avoptions(AVDictionary **a, AVDictionary *b)
}
}
void assert_avoptions(AVDictionary *m)
int check_avoptions(AVDictionary *m)
{
const AVDictionaryEntry *t;
if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key);
exit_program(1);
return AVERROR_OPTION_NOT_FOUND;
}
return 0;
}
void update_benchmark(const char *fmt, ...)