0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

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).
This commit is contained in:
wm4 2014-12-01 16:09:25 +01:00
parent 62998e9709
commit 52c51149db

View File

@ -2145,7 +2145,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,
};