diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index cac64cd45c055..8c9e141d678b0 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2423,6 +2423,11 @@ Subtitles This also controls some bitmap subtitle overrides, as well as HTML tags in formats like SRT, despite the name of the option. +``--secondary-sub-override=`` + Control whether user style overrides of secondary subtitles should be applied. + + Default: yes. + ``--sub-ass-force-margins`` Enables placing toptitles and subtitles in black borders when they are available, if the subtitles are in the ASS format. diff --git a/options/options.c b/options/options.c index b6fe46e948f06..f6156c7a550ee 100644 --- a/options/options.c +++ b/options/options.c @@ -290,6 +290,7 @@ const struct m_sub_options mp_subtitle_sub_opts = { {"sub-ass-justify", OPT_FLAG(ass_justify)}, {"sub-ass-override", OPT_CHOICE(ass_style_override, {"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5})}, + {"secondary-sub-override", OPT_FLAG(sec_sub_override)}, {"sub-scale-by-window", OPT_FLAG(sub_scale_by_window)}, {"sub-scale-with-window", OPT_FLAG(sub_scale_with_window)}, {"sub-ass-scale-with-window", OPT_FLAG(ass_scale_with_window)}, @@ -321,6 +322,7 @@ const struct m_sub_options mp_subtitle_sub_opts = { .ass_feature_whole_text_layout = 0, .ass_feature_wrap_unicode = 1, .ass_style_override = 1, + .sec_sub_override = 1, .ass_shaper = 1, .use_embedded_fonts = 1, }, diff --git a/options/options.h b/options/options.h index 1fc977f43196b..97c7a7cf7f087 100644 --- a/options/options.h +++ b/options/options.h @@ -107,6 +107,7 @@ struct mp_subtitle_opts { char **ass_force_style_list; char *ass_styles_file; int ass_style_override; + int sec_sub_override; int ass_hinting; int ass_shaper; int ass_justify; diff --git a/player/sub.c b/player/sub.c index b11372636a854..549c48d55e72e 100644 --- a/player/sub.c +++ b/player/sub.c @@ -200,7 +200,9 @@ void reinit_sub(struct MPContext *mpctx, struct track *track) sub_select(track->d_sub, true); int order = get_order(mpctx, track); osd_set_sub(mpctx->osd, order, track->d_sub); - sub_control(track->d_sub, SD_CTRL_SET_TOP, &order); + + if (mpctx->opts->subs_rend->sec_sub_override) + sub_control(track->d_sub, SD_CTRL_SET_TOP, &order); if (mpctx->playback_initialized) update_subtitles(mpctx, mpctx->playback_pts);