summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/m_option.c b/m_option.c
index 14da9809c4..95f895ca04 100644
--- a/m_option.c
+++ b/m_option.c
@@ -765,7 +765,11 @@ m_option_type_t m_option_type_func = {
/////////////////// Print
static int parse_print(m_option_t* opt,char *name, char *param, void* dst, int src) {
- mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", (char *) opt->p);
+ if(opt->type->flags&M_OPT_TYPE_INDIRECT)
+ mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", *(char **) opt->p);
+ else
+ mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", (char *) opt->p);
+
if(opt->priv == NULL)
exit(1); // Call something else instead ??
return 1;
@@ -784,6 +788,20 @@ m_option_type_t m_option_type_print = {
NULL
};
+m_option_type_t m_option_type_print_indirect = {
+ "Print",
+ "",
+ 0,
+ M_OPT_TYPE_INDIRECT,
+ parse_print,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+
/////////////////////// Subconfig
#undef VAL
#define VAL(x) (*(char***)(x))