- if (ost->avfilter) {
- char *filter_script = NULL, *filter = NULL;
- MATCH_PER_STREAM_OPT(filter_scripts, str, filter_script, oc, ost->st);
- MATCH_PER_STREAM_OPT(filters, str, filter, oc, ost->st);
-
- if (filter || filter_script) {
- av_log(NULL, AV_LOG_ERROR,
- "Filter graph '%s' or filter script '%s' was specified through the -filter/-filter_script/-vf/-af option "
- "for output stream %d:%d, which is fed from a complex filtergraph.\n"
- "-filter/-filter_script and -filter_complex cannot be used together for the same stream.\n",
- (char *)av_x_if_null(filter, "(none)"),
- (char *)av_x_if_null(filter_script, "(none)"),
- ost->file_index, ost->index);
- exit_program(1);
- }
+ if (ost->avfilter && (ost->filters || ost->filters_script)) {
+ const char *opt = ost->filters ? "-vf/-af/-filter" : "-filter_script";
+ av_log(NULL, AV_LOG_ERROR,
+ "%s '%s' was specified through the %s option "
+ "for output stream %d:%d, which is fed from a complex filtergraph.\n"
+ "%s and -filter_complex cannot be used together for the same stream.\n",
+ ost->filters ? "Filtergraph" : "Filtergraph script",
+ ost->filters ? ost->filters : ost->filters_script,
+ opt, ost->file_index, ost->index, opt);
+ exit_program(1);