options: rename --sub-ass-line-spacing to --sub-line-spacing

Because it also affects plain text subtitles.
This commit is contained in:
Guido Cella
2024-11-09 16:52:38 +01:00
committed by Kacper Michajłow
parent 4908a632d3
commit 3291254263
5 changed files with 6 additions and 5 deletions

View File

@@ -0,0 +1 @@
rename `--sub-ass-line-spacing` to `--sub-line-spacing`

View File

@@ -2521,7 +2521,7 @@ Subtitles
of animations with some badly authored ASS scripts. It is recommended
to not use this option, unless really needed.
``--sub-ass-line-spacing=<value>``
``--sub-line-spacing=<value>``
Set line spacing value for SSA/ASS renderer.
``--sub-ass-shaper=<simple|complex>``

View File

@@ -296,8 +296,8 @@ const struct m_sub_options mp_subtitle_sub_opts = {
{"sub-gray", OPT_BOOL(sub_gray)},
{"sub-ass", OPT_BOOL(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)},
{"sub-line-spacing", OPT_FLOAT(sub_line_spacing), M_RANGE(-1000, 1000)},
{"sub-ass-line-spacing", OPT_REPLACED("sub-line-spacing")},
{"sub-use-margins", OPT_BOOL(sub_use_margins)},
{"sub-ass-force-margins", OPT_BOOL(ass_use_margins)},
{"sub-ass-vsfilter-color-compat", OPT_CHOICE(ass_vsfilter_color_compat,

View File

@@ -106,7 +106,7 @@ struct mp_subtitle_opts {
float sub_gauss;
bool sub_gray;
bool ass_enabled;
float ass_line_spacing;
float sub_line_spacing;
bool ass_use_margins;
bool sub_use_margins;
int ass_vsfilter_color_compat;

View File

@@ -536,7 +536,7 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim,
}
if (converted || shared_opts->ass_style_override[sd->order]) {
set_sub_pos = 100.0f - shared_opts->sub_pos[sd->order];
set_line_spacing = opts->ass_line_spacing;
set_line_spacing = opts->sub_line_spacing;
set_hinting = opts->ass_hinting;
}
if (total_override || shared_opts->ass_style_override[sd->order] == ASS_STYLE_OVERRIDE_SCALE) {