m_config_frontend: use m_option_set_node_or_string

There is a usage of m_option_parse which exactly mirrors the intention
of the helper function m_option_set_node_or_string. Instead of
duplicating the logic, just call the m_option_set_node_or_string
instead.
This commit is contained in:
Dudemanguy committed 2025-07-15 18:06:14 +00:00
1 parent 024628eb4b
commit 04ca4fd1ed
1 file changed
+1 -7
+1 -7
View File
@@ -788,13 +788,7 @@ int m_config_set_option_node(struct m_config *config, bstr name,
// the old value, as opposed to e.g. appending to lists.
union m_option_value val = m_option_value_default;
if (data->format == MPV_FORMAT_STRING) {
bstr param = bstr0(data->u.string);
r = m_option_parse(mp_null_log, co->opt, name, param, &val);
} else {
r = m_option_set_node(co->opt, &val, data);
}
r = m_option_set_node_or_string(mp_null_log, co->opt, name, &val, data);
if (r >= 0)
r = m_config_set_option_raw(config, co, &val, flags);