mirror of https://github.com/mpv-player/mpv
lcms: fix validate_3dlut_size_opt
Not only was this function needlessly convoluted, it was also broken - since it returned a bool value where an error code was expected.
This commit is contained in:
parent
b9b3342369
commit
e1a04cd8ac
|
@ -486,11 +486,8 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **result_lut3d,
|
|||
static int validate_3dlut_size_opt(struct mp_log *log, const m_option_t *opt,
|
||||
struct bstr name, const char **value)
|
||||
{
|
||||
struct bstr param = bstr0(*value);
|
||||
int p1, p2, p3;
|
||||
char s[20];
|
||||
snprintf(s, sizeof(s), "%.*s", BSTR_P(param));
|
||||
return gl_parse_3dlut_size(s, &p1, &p2, &p3);
|
||||
return gl_parse_3dlut_size(*value, &p1, &p2, &p3) ? 0 : M_OPT_INVALID;
|
||||
}
|
||||
|
||||
#define OPT_BASE_STRUCT struct mp_icc_opts
|
||||
|
|
Loading…
Reference in New Issue