summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-04-03 09:44:25 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-09 19:12:59 +0200
commit62549f9655c48f0ec061087fa33a96040ce01145 (patch)
tree5322f1aec51e2e9950bada80631528fc3dc4384a /libavfilter/avfilter.c
parentc43a7ecad997fc527af34b952334f3d030709a1b (diff)
lavfi: error out when options are provided to a filter that does not take any
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 2dbd68ffff..1ba91d9821 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -480,7 +480,13 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
AVDictionaryEntry *e;
int ret=0;
- if (args && *args && filter->filter->priv_class) {
+ if (args && *args) {
+ if (!filter->filter->priv_class) {
+ av_log(filter, AV_LOG_ERROR, "This filter does not take any "
+ "options, but options were provided: %s.\n", args);
+ return AVERROR(EINVAL);
+ }
+
#if FF_API_OLD_FILTER_OPTS
if (!strcmp(filter->filter->name, "scale") &&
strchr(args, ':') < strchr(args, '=')) {