summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-08 02:57:42 +0100
committerwm4 <wm4@nowhere>2012-12-12 23:35:24 +0100
commit69e13388342379a256a4a8e9f5a518fcdce453ab (patch)
treed65a33e66fe0f938cb163db5c3ba853e348ef608 /video/filter
parentb0558e48b184cb9a4555d8156d86bebe2315690f (diff)
downloadmpv-69e13388342379a256a4a8e9f5a518fcdce453ab.tar.bz2
mpv-69e13388342379a256a4a8e9f5a518fcdce453ab.tar.xz
vf_sub: fix aspect ratio when using margins
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_sub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 12149af007..2dc1b9afd9 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -66,14 +66,14 @@ static int config(struct vf_instance *vf,
vf->priv->outh = height + opts->ass_top_margin + opts->ass_bottom_margin;
vf->priv->outw = width;
+ double dar = (double)d_width / d_height;
+ double sar = (double)width / height;
+
if (!opts->screen_size_x && !opts->screen_size_y) {
d_width = d_width * vf->priv->outw / width;
d_height = d_height * vf->priv->outh / height;
}
- double dar = (double)d_width / d_height;
- double sar = (double)width / height;
-
vf->priv->dim = (struct mp_osd_res) {
.w = vf->priv->outw,
.h = vf->priv->outh,