From 9242c34fa26aafb09a9973a5175c281233a13bdc Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 20:03:36 +0100 Subject: 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. --- options/m_option.c | 2 +- options/m_option.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'options') 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 { -- cgit v1.2.3