summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 20:03:36 +0100
committerwm4 <wm4@nowhere>2013-12-21 21:43:16 +0100
commit9242c34fa26aafb09a9973a5175c281233a13bdc (patch)
treec94bf638a38ce29c8c6e37c9c6167968e8d3cc34 /options
parentd8d42b44fc717c695af59c14213d54885088ea37 (diff)
downloadmpv-9242c34fa26aafb09a9973a5175c281233a13bdc.tar.bz2
mpv-9242c34fa26aafb09a9973a5175c281233a13bdc.tar.xz
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.c2
-rw-r--r--options/m_option.h4
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 {