From 1b0bf6507ec79afe503db3ffffa70039f5d6b85e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 Dec 2014 16:09:25 +0100 Subject: options: fix channel map options sometimes failing Channel amp otpions were not copied correctly: it copied the size of a pointer to struct chmap, not the struct itself. Since mp_chmap is currently 9 bytes, this meant the last channel entry was not copied correctly on 64 bit systems, leading to very strange failures. It could be triggered especially when using the client API, because the client API always copies options on access (mpv command line options tend to work directly on options). --- options/m_option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options') diff --git a/options/m_option.c b/options/m_option.c index 8044376f07..d85c6ca4b8 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2146,7 +2146,7 @@ static int parse_chmap(struct mp_log *log, const m_option_t *opt, const m_option_type_t m_option_type_chmap = { .name = "Audio channels or channel map", - .size = sizeof(struct mp_chmap *), + .size = sizeof(struct mp_chmap), .parse = parse_chmap, .copy = copy_opt, }; -- cgit v1.2.3