diff options
author | wm4 <wm4@nowhere> | 2015-01-05 19:18:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-05 19:18:08 +0100 |
commit | 067bb9605c6333bf9d552d1c12f65ccadbb2fc2f (patch) | |
tree | f2c1ab202d0f517f195addbdd7e43116bcb8e5b0 /sub | |
parent | 2ab259e6832dff38f13cdaa2a8c83b273efa8ec7 (diff) | |
download | mpv-067bb9605c6333bf9d552d1c12f65ccadbb2fc2f.tar.bz2 mpv-067bb9605c6333bf9d552d1c12f65ccadbb2fc2f.tar.xz |
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.)
Diffstat (limited to 'sub')
-rw-r--r-- | sub/ass_mp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |