From c9df2c8bd83b31375a79ab2bc4f854a53ff019c1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 11 Oct 2012 02:23:29 +0200 Subject: sub: add --ass-style-override option to disable style overrides There are a number of options which modify ASS subtitle rendering. Most of these do things that can interfere with the styling done by subtitle scripts, resulting in incorrect rendering. Add the --ass-style-override option to make it easy to disable all overrides. This helps trouble- shooting, and makes it more practical to use the override features. (You can simply toggle the ass-style-override property at runtime, should one of the style override options break subtitle rendering at a certain point.) This mainly affects whether most --ass-* options are applied, as well as --sub-pos. Some things, like explicit style overrides loaded with --ass-force-style, can't be changed at runtime using the ass-style-override property. --- sub/sd_ass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 9295cab07d..fcedc9fec5 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -135,7 +135,9 @@ static void get_bitmaps(struct sh_sub *sh, struct osd_state *osd, return; double scale = osd->normal_scale; - if (ctx->vsfilter_aspect && opts->ass_vsfilter_aspect_compat) + bool use_vs_aspect = opts->ass_style_override + ? opts->ass_vsfilter_aspect_compat : 1; + if (ctx->vsfilter_aspect && use_vs_aspect) scale = osd->vsfilter_scale; ASS_Renderer *renderer = osd->ass_renderer; mp_ass_configure(renderer, opts, &osd->dim, osd->unscaled); -- cgit v1.2.3