summaryrefslogtreecommitdiffstats
path: root/options/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'options/m_option.c')
-rw-r--r--options/m_option.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/options/m_option.c b/options/m_option.c
index 892016c935..d0f5e7a418 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -3021,7 +3021,11 @@ static int parse_obj_settings(struct mp_log *log, struct bstr opt, int op,
mp_warn(log, "Driver '%s' has been replaced with '%s'!\n",
desc.replaced_name, desc.name);
} else {
- if (!list->allow_unknown_entries) {
+ char name[80];
+ snprintf(name, sizeof(name), "%.*s", BSTR_P(str));
+ if (!list->allow_unknown_entries ||
+ (list->check_unknown_entry && !list->check_unknown_entry(name)))
+ {
mp_err(log, "Option %.*s: %.*s doesn't exist.\n",
BSTR_P(opt), BSTR_P(str));
return M_OPT_INVALID;