summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-17 19:52:33 +0200
committerwm4 <wm4@nowhere>2013-08-17 19:52:33 +0200
commit76963781df0518ea902a4d2bb618378aff3e4c6e (patch)
treea267dc784d5d297fd7b397292ece3c4d4c8da77e
parentc890b8942d558f0746892730a587302c33471285 (diff)
downloadmpv-76963781df0518ea902a4d2bb618378aff3e4c6e.tar.bz2
mpv-76963781df0518ea902a4d2bb618378aff3e4c6e.tar.xz
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.
-rw-r--r--mpvcore/m_option.c5
1 files changed, 5 insertions, 0 deletions
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,
};