diff options
author | dyphire <qimoge@gmail.com> | 2023-12-18 03:18:11 +0800 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-12-18 14:58:34 +0000 |
commit | b563b2aed0aaca7a51ffe40e0e923c00fd77de46 (patch) | |
tree | 556f5cf4ffd7581df3f187895e1558d88d3398a2 /options | |
parent | 702b3eb956a23b73e0f23763fea6cebed004cb44 (diff) | |
download | mpv-b563b2aed0aaca7a51ffe40e0e923c00fd77de46.tar.bz2 mpv-b563b2aed0aaca7a51ffe40e0e923c00fd77de46.tar.xz |
options: add --secondary-sub-ass-override
Default: strip. preserve the old behavior
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 13 | ||||
-rw-r--r-- | options/options.h | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/options/options.c b/options/options.c index 401eda919d..9dc01b48b4 100644 --- a/options/options.c +++ b/options/options.c @@ -313,9 +313,6 @@ const struct m_sub_options mp_subtitle_sub_opts = { {"sub-ass-shaper", OPT_CHOICE(ass_shaper, {"simple", 0}, {"complex", 1})}, {"sub-ass-justify", OPT_BOOL(ass_justify)}, - {"sub-ass-override", OPT_CHOICE(ass_style_override, - {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5}), - .flags = UPDATE_SUB_HARD}, {"sub-scale-by-window", OPT_BOOL(sub_scale_by_window)}, {"sub-scale-with-window", OPT_BOOL(sub_scale_with_window)}, {"sub-ass-scale-with-window", OPT_BOOL(ass_scale_with_window)}, @@ -338,7 +335,6 @@ const struct m_sub_options mp_subtitle_sub_opts = { .ass_vsfilter_aspect_compat = true, .ass_vsfilter_color_compat = 1, .ass_vsfilter_blur_compat = true, - .ass_style_override = 1, .ass_shaper = 1, .use_embedded_fonts = true, }, @@ -356,6 +352,12 @@ const struct m_sub_options mp_subtitle_shared_sub_opts = { {"secondary-sub-pos", OPT_FLOAT(sub_pos[1]), M_RANGE(0.0, 150.0)}, {"sub-visibility", OPT_BOOL(sub_visibility[0])}, {"secondary-sub-visibility", OPT_BOOL(sub_visibility[1])}, + {"sub-ass-override", OPT_CHOICE(ass_style_override[0], + {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5}), + .flags = UPDATE_SUB_HARD}, + {"secondary-sub-ass-override", OPT_CHOICE(ass_style_override[1], + {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5}), + .flags = UPDATE_SUB_HARD}, {0} }, .size = sizeof(OPT_BASE_STRUCT), @@ -363,6 +365,8 @@ const struct m_sub_options mp_subtitle_shared_sub_opts = { .sub_visibility[0] = true, .sub_visibility[1] = true, .sub_pos[0] = 100, + .ass_style_override[0] = 1, + .ass_style_override[1] = 5, }, .change_flags = UPDATE_OSD, }; @@ -1090,6 +1094,7 @@ static const struct MPOpts mp_default_opts = { "sub-ass-force-margins", "sub-ass-vsfilter-aspect-compat", "sub-ass-override", + "secondary-sub-ass-override", "secondary-sub-visibility", "ab-loop-a", "ab-loop-b", diff --git a/options/options.h b/options/options.h index 86344c52f6..9efaff76a8 100644 --- a/options/options.h +++ b/options/options.h @@ -107,7 +107,6 @@ struct mp_subtitle_opts { bool use_embedded_fonts; char **ass_style_override_list; char *ass_styles_file; - int ass_style_override; int ass_hinting; int ass_shaper; bool ass_justify; @@ -121,6 +120,7 @@ struct mp_subtitle_shared_opts { float sub_delay[2]; float sub_pos[2]; bool sub_visibility[2]; + int ass_style_override[2]; }; struct mp_sub_filter_opts { |