diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index f9cc1cd956..3ef1b9e427 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -103,6 +103,7 @@ Interface changes - disable `--allow-delayed-peak-detect` by default - rename `--fps` to `--container-fps-override` - rename `--override-display-fps` to `--display-fps-override` + - rename `--sub-ass-force-style` to `--sub-ass-style-overrides` --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index d93493487b..3aee640800 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2399,15 +2399,15 @@ Subtitles ``--sub-speed=25/23.976`` plays frame based subtitles which have been loaded assuming a framerate of 23.976 at 25 FPS. -``--sub-ass-force-style=<[Style.]Param=Value[,...]>`` +``--sub-ass-style-overrides=<[Style.]Param=Value[,...]>`` Override some style or script info parameters. This is a string list option. See `List Options`_ for details. .. admonition:: Examples - - ``--sub-ass-force-style=FontName=Arial,Default.Bold=1`` - - ``--sub-ass-force-style=PlayResY=768`` + - ``--sub-ass-style-overrides=FontName=Arial,Default.Bold=1`` + - ``--sub-ass-style-overrides=PlayResY=768`` .. note:: diff --git a/options/options.c b/options/options.c index fdf787cbf6..25dc84ad32 100644 --- a/options/options.c +++ b/options/options.c @@ -305,7 +305,7 @@ const struct m_sub_options mp_subtitle_sub_opts = { {"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})}, {"sub-ass-vsfilter-blur-compat", OPT_BOOL(ass_vsfilter_blur_compat)}, {"embeddedfonts", OPT_BOOL(use_embedded_fonts), .flags = UPDATE_SUB_HARD}, - {"sub-ass-force-style", OPT_STRINGLIST(ass_force_style_list), + {"sub-ass-style-overrides", OPT_STRINGLIST(ass_style_override_list), .flags = UPDATE_SUB_HARD}, {"sub-ass-styles", OPT_STRING(ass_styles_file), .flags = M_OPT_FILE | UPDATE_SUB_HARD}, @@ -323,6 +323,7 @@ const struct m_sub_options mp_subtitle_sub_opts = { {"sub-clear-on-seek", OPT_BOOL(sub_clear_on_seek)}, {"teletext-page", OPT_INT(teletext_page), M_RANGE(1, 999)}, {"sub-past-video-end", OPT_BOOL(sub_past_video_end)}, + {"sub-ass-force-style", OPT_REPLACED("sub-ass-style-overrides")}, {0} }, .size = sizeof(OPT_BASE_STRUCT), diff --git a/options/options.h b/options/options.h index 0dcbe0adef..3c1e947622 100644 --- a/options/options.h +++ b/options/options.h @@ -108,7 +108,7 @@ struct mp_subtitle_opts { int ass_vsfilter_color_compat; bool ass_vsfilter_blur_compat; bool use_embedded_fonts; - char **ass_force_style_list; + char **ass_style_override_list; char *ass_styles_file; int ass_style_override; int ass_hinting; diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 2b41214153..b24e228119 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -214,7 +214,7 @@ static void assobjects_init(struct sd *sd) add_subtitle_fonts(sd); if (opts->ass_style_override) - ass_set_style_overrides(ctx->ass_library, opts->ass_force_style_list); + ass_set_style_overrides(ctx->ass_library, opts->ass_style_override_list); ctx->ass_track = ass_new_track(ctx->ass_library); ctx->ass_track->track_type = TRACK_TYPE_ASS; @@ -452,9 +452,9 @@ static void configure_ass(struct sd *sd, struct mp_osd_res *dim, #endif if (converted) { bool override_playres = true; - char **ass_force_style_list = opts->ass_force_style_list; - for (int i = 0; ass_force_style_list && ass_force_style_list[i]; i++) { - if (bstr_find0(bstr0(ass_force_style_list[i]), "PlayResX") >= 0) + char **ass_style_override_list = opts->ass_style_override_list; + for (int i = 0; ass_style_override_list && ass_style_override_list[i]; i++) { + if (bstr_find0(bstr0(ass_style_override_list[i]), "PlayResX") >= 0) override_playres = false; }