From 067bb9605c6333bf9d552d1c12f65ccadbb2fc2f Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Jan 2015 19:18:08 +0100 Subject: sub: add option to not scale subtitles with window --sub-scale-by-window=no attempts to keep subs always at the same pixel size. The implementation is a bit all over the place, because it compensates already done scaling by an inverse scale factor, but it will probably do its job. Fixes #1424. (The semantics and name of --sub-scale-with-window are kept, and this adds a new option - the name is confusingly similar, but it's actually analogue to --osd-scale-by-window.) --- sub/ass_mp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sub/ass_mp.c') diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 3140597fd2..cfec8ac91d 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -146,6 +146,11 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts, int vidh = dim->h - (dim->mt + dim->mb); set_font_scale *= dim->h / (float)MPMAX(vidh, 1); } + if (!opts->sub_scale_by_window) { + double factor = dim->h / 720.0; + if (factor != 0.0) + set_font_scale /= factor; + } } ass_set_use_margins(priv, set_use_margins); -- cgit v1.2.3