diff options
author | wm4 <wm4@nowhere> | 2013-12-21 20:03:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 21:43:16 +0100 |
commit | 9242c34fa26aafb09a9973a5175c281233a13bdc (patch) | |
tree | c94bf638a38ce29c8c6e37c9c6167968e8d3cc34 /options | |
parent | d8d42b44fc717c695af59c14213d54885088ea37 (diff) |
m_option: add mp_log callback to OPT_STRING_VALIDATE options
And also convert a bunch of other code, especially ao_wasapi and
ao_portaudio.
Diffstat (limited to 'options')
-rw-r--r-- | options/m_option.c | 2 | ||||
-rw-r--r-- | options/m_option.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/options/m_option.c b/options/m_option.c index 69d8ba0376..f3b7afcd18 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -801,7 +801,7 @@ static int parse_str(struct mp_log *log, const m_option_t *opt, m_opt_string_validate_fn validate = opt->priv; if (validate) { - r = validate(opt, name, param); + r = validate(log, opt, name, param); if (r < 0) goto exit; } diff --git a/options/m_option.h b/options/m_option.h index 5abe605e95..7caa103f2f 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -160,8 +160,8 @@ struct m_opt_choice_alternatives { }; // For OPT_STRING_VALIDATE(). Behaves like m_option_type.parse(). -typedef int (*m_opt_string_validate_fn)(const m_option_t *opt, struct bstr name, - struct bstr param); +typedef int (*m_opt_string_validate_fn)(struct mp_log *log, const m_option_t *opt, + struct bstr name, struct bstr param); // m_option.priv points to this if M_OPT_TYPE_USE_SUBSTRUCT is used struct m_sub_options { |