From 69e13388342379a256a4a8e9f5a518fcdce453ab Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 8 Nov 2012 02:57:42 +0100 Subject: vf_sub: fix aspect ratio when using margins --- video/filter/vf_sub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video') 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, -- cgit v1.2.3