mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
lavfi: error out when options are provided to a filter that does not take any
This commit is contained in:
parent
c43a7ecad9
commit
62549f9655
@ -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, '=')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user