summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/m_option.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/options/m_option.c b/options/m_option.c
index 9f2d8758d0..5b07ba5d2a 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -2287,10 +2287,18 @@ static int parse_chmap(struct mp_log *log, const m_option_t *opt,
return 1;
}
+static char *print_chmap(const m_option_t *opt, const void *val)
+{
+ const struct mp_chmap *chmap = val;
+ return talloc_strdup(NULL, mp_chmap_to_str(chmap));
+}
+
+
const m_option_type_t m_option_type_chmap = {
.name = "Audio channels or channel map",
.size = sizeof(struct mp_chmap),
.parse = parse_chmap,
+ .print = print_chmap,
.copy = copy_opt,
};