From 76963781df0518ea902a4d2bb618378aff3e4c6e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 17 Aug 2013 19:52:33 +0200 Subject: m_option: add missing copy callback for some option types One reaosn for this is that this broke proper handling of .defval, since m_option_copy did nothing for these option types. --- mpvcore/m_option.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mpvcore') diff --git a/mpvcore/m_option.c b/mpvcore/m_option.c index 1e195bcece..034c7d7c66 100644 --- a/mpvcore/m_option.c +++ b/mpvcore/m_option.c @@ -186,6 +186,7 @@ const m_option_type_t m_option_type_store = { .size = sizeof(int), .flags = M_OPT_TYPE_OPTIONAL_PARAM, .parse = parse_store, + .copy = copy_opt, }; // Same for float types @@ -214,6 +215,7 @@ const m_option_type_t m_option_type_float_store = { .size = sizeof(float), .flags = M_OPT_TYPE_OPTIONAL_PARAM, .parse = parse_store_float, + .copy = copy_opt, }; // Integer @@ -1329,6 +1331,7 @@ const m_option_type_t m_option_type_color = { .name = "Color", .size = sizeof(struct m_color), .parse = parse_color, + .copy = copy_opt, }; @@ -1473,6 +1476,7 @@ const m_option_type_t m_option_type_geometry = { .name = "Window geometry", .size = sizeof(struct m_geometry), .parse = parse_geometry, + .copy = copy_opt, }; static int parse_size_box(const m_option_t *opt, struct bstr name, @@ -1502,6 +1506,7 @@ const m_option_type_t m_option_type_size_box = { .name = "Window size", .size = sizeof(struct m_geometry), .parse = parse_size_box, + .copy = copy_opt, }; -- cgit v1.2.3