1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

options: add UPDATE_SUB_HARD flag to sub-ass-override

The other options that have to do with ass styles also uses this flag.
It's needed since we have to destroy the ass objects and reinit them.
It's a bit incomplete since it will technically only properly work when
paused (while playing, the current subtitle gets discarded). That fix is
in the next commit.
This commit is contained in:
Dudemanguy 2023-10-20 11:13:43 -05:00
parent 6f8d98f812
commit 90170c1100

View File

@ -315,7 +315,8 @@ const struct m_sub_options mp_subtitle_sub_opts = {
{"simple", 0}, {"complex", 1})}, {"simple", 0}, {"complex", 1})},
{"sub-ass-justify", OPT_BOOL(ass_justify)}, {"sub-ass-justify", OPT_BOOL(ass_justify)},
{"sub-ass-override", OPT_CHOICE(ass_style_override, {"sub-ass-override", OPT_CHOICE(ass_style_override,
{"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5})}, {"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-by-window", OPT_BOOL(sub_scale_by_window)},
{"sub-scale-with-window", OPT_BOOL(sub_scale_with_window)}, {"sub-scale-with-window", OPT_BOOL(sub_scale_with_window)},
{"sub-ass-scale-with-window", OPT_BOOL(ass_scale_with_window)}, {"sub-ass-scale-with-window", OPT_BOOL(ass_scale_with_window)},