From 04ca4fd1ed66bd57207352709be0fe5a7d4ceaea Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 12 Jul 2025 15:18:11 -0500 Subject: [PATCH] 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. --- options/m_config_frontend.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/options/m_config_frontend.c b/options/m_config_frontend.c index 2b812e0232..fc92a28e72 100644 --- a/options/m_config_frontend.c +++ b/options/m_config_frontend.c @@ -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);