mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-23 19:30:20 +00:00
m_option: remove unneeded legacy syntax parsing
This code got shuffled around over the years but fundamentally it was first introduced in2c22fcd350to fix a parsing issue with specifically the af and vf options. Syntax like af* and vf* used to be valid and this was part of dealing with that case. Later50008adf4acompletely changed this and ripped out support for the wildcard behavior. But these few lines to deal with the special case were never removed. The token splitting has been unnecessary for years and is confusing, so clean this up and finally remove it.
This commit is contained in:
@@ -123,12 +123,7 @@ int m_option_set_node_or_string(struct mp_log *log, const m_option_t *opt,
|
||||
struct bstr name, void *dst, struct mpv_node *src)
|
||||
{
|
||||
if (src->format == MPV_FORMAT_STRING) {
|
||||
// The af and vf option unfortunately require this, because the
|
||||
// option name includes the "action".
|
||||
bstr optname = name, a, b;
|
||||
if (bstr_split_tok(optname, "/", &a, &b))
|
||||
optname = b;
|
||||
return m_option_parse(log, opt, optname, bstr0(src->u.string), dst);
|
||||
return m_option_parse(log, opt, name, bstr0(src->u.string), dst);
|
||||
} else {
|
||||
return m_option_set_node(opt, dst, src);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user