summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-08-12 17:28:08 +0200
committerwm4 <wm4@nowhere>2020-08-12 17:28:25 +0200
commitcda8f1613ff307a9e0b5528743f3e941b05dcee7 (patch)
tree248182c3e4207b11abd11c39488303c76f4e4c32 /options/options.c
parent720bcd79d0304dd82e607efa95d421f402c8a3dd (diff)
downloadmpv-cda8f1613ff307a9e0b5528743f3e941b05dcee7.tar.bz2
mpv-cda8f1613ff307a9e0b5528743f3e941b05dcee7.tar.xz
sd_ass: force full reinit if certain options change at runtime
Options like --sub-ass-force-style and others could not be changed at runtime (the changes didn't take any effect). Fix this by using the brutal approach, and completely reinit the subtitle state when this happens. Maybe a bit clunky, but for now I'd rather not put more effort into this. Fixes: #7689
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/options/options.c b/options/options.c
index 63c99053a8..efde6fad4b 100644
--- a/options/options.c
+++ b/options/options.c
@@ -235,7 +235,7 @@ const struct m_sub_options mp_subtitle_sub_opts = {
{"sub-pos", OPT_INT(sub_pos), M_RANGE(0, 100)},
{"sub-gauss", OPT_FLOAT(sub_gauss), M_RANGE(0.0, 3.0)},
{"sub-gray", OPT_FLAG(sub_gray)},
- {"sub-ass", OPT_FLAG(ass_enabled)},
+ {"sub-ass", OPT_FLAG(ass_enabled), .flags = UPDATE_SUB_HARD},
{"sub-scale", OPT_FLOAT(sub_scale), M_RANGE(0, 100)},
{"sub-ass-line-spacing", OPT_FLOAT(ass_line_spacing),
M_RANGE(-1000, 1000)},
@@ -245,9 +245,11 @@ const struct m_sub_options mp_subtitle_sub_opts = {
{"sub-ass-vsfilter-color-compat", OPT_CHOICE(ass_vsfilter_color_compat,
{"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})},
{"sub-ass-vsfilter-blur-compat", OPT_FLAG(ass_vsfilter_blur_compat)},
- {"embeddedfonts", OPT_FLAG(use_embedded_fonts)},
- {"sub-ass-force-style", OPT_STRINGLIST(ass_force_style_list)},
- {"sub-ass-styles", OPT_STRING(ass_styles_file), .flags = M_OPT_FILE},
+ {"embeddedfonts", OPT_FLAG(use_embedded_fonts), .flags = UPDATE_SUB_HARD},
+ {"sub-ass-force-style", OPT_STRINGLIST(ass_force_style_list),
+ .flags = UPDATE_SUB_HARD},
+ {"sub-ass-styles", OPT_STRING(ass_styles_file), .flags = M_OPT_FILE,
+ .flags = UPDATE_SUB_HARD},
{"sub-ass-hinting", OPT_CHOICE(ass_hinting,
{"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})},
{"sub-ass-shaper", OPT_CHOICE(ass_shaper,