mirror of https://github.com/mpv-player/mpv
m_option: fix -vo opengl lscale validation
OPT_STRING_VALIDATE actually did nothing. This made -vo opengl crash or misbehave when passing an invalid value for the lscale, cscale or 3dlut- size (the only users for this option type). The code added with this commit was either blatantly forgotten with the commit introducing this option type, or somehow lost.
This commit is contained in:
parent
e9af899237
commit
07fc939544
|
@ -762,6 +762,13 @@ static int parse_str(const m_option_t *opt, struct bstr name,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
m_opt_string_validate_fn validate = opt->priv;
|
||||
if (validate) {
|
||||
r = validate(opt, name, param);
|
||||
if (r < 0)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (opt->flags & M_OPT_PARSE_ESCAPES) {
|
||||
char *res = unescape_string(tmp, param);
|
||||
if (!res) {
|
||||
|
|
Loading…
Reference in New Issue