summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-08-17 20:04:57 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-08-18 10:18:43 -0400
commitad7d972e08dddb1788ac6a434d1be314febcb09d (patch)
treef998a5fd0fcd10f0e1c56d621c54dd0ac4eb0ddf /libavfilter/avfilter.c
parent22f85543ed92f4c6453b110137834151dee0d7eb (diff)
lavfi: add error message to help users convert to new lavfi syntax.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 700baa29cc..6475f29f26 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -895,7 +895,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
return AVERROR(EINVAL);
}
-#if FF_API_OLD_FILTER_OPTS
+#if FF_API_OLD_FILTER_OPTS || FF_API_OLD_FILTER_OPTS_ERROR
if ( !strcmp(filter->filter->name, "format") ||
!strcmp(filter->filter->name, "noformat") ||
!strcmp(filter->filter->name, "frei0r") ||
@@ -955,12 +955,23 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
while ((p = strchr(p, ':')))
*p++ = '|';
+#if FF_API_OLD_FILTER_OPTS
if (deprecated)
av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
"'|' to separate the list items.\n");
av_log(filter, AV_LOG_DEBUG, "compat: called with args=[%s]\n", copy);
ret = process_options(filter, &options, copy);
+#else
+ if (deprecated) {
+ av_log(filter, AV_LOG_ERROR, "This syntax is deprecated. Use "
+ "'|' to separate the list items ('%s' instead of '%s')\n",
+ copy, args);
+ ret = AVERROR(EINVAL);
+ } else {
+ ret = process_options(filter, &options, copy);
+ }
+#endif
av_freep(&copy);
if (ret < 0)