]> granicus.if.org Git - libass/commitdiff
Assume pixel ratio equals aspect ratio
authorGrigori Goronzy <greg@blackbox>
Tue, 30 Jun 2009 22:16:20 +0000 (00:16 +0200)
committerGrigori Goronzy <greg@blackbox>
Tue, 30 Jun 2009 22:16:20 +0000 (00:16 +0200)
In ass_set_frame_size pixel_ratio will be set alongside aspect ratio to
the same value.  This makes it possible to use libass without
explicitely specifying an aspect ratio.

libass/ass_render.c

index 9d727cdd7e2c96a81d4c61f497f311c5daf7842f..07096f8274ab6a4ec3e0b067ea22b9d4767e4554 100644 (file)
@@ -2852,8 +2852,10 @@ void ass_set_frame_size(ass_renderer_t *priv, int w, int h)
     if (priv->settings.frame_width != w || priv->settings.frame_height != h) {
         priv->settings.frame_width = w;
         priv->settings.frame_height = h;
-        if (priv->settings.aspect == 0.)
+        if (priv->settings.aspect == 0.) {
             priv->settings.aspect = ((double) w) / h;
+            priv->settings.pixel_ratio = ((double) w) / h;
+        }
         ass_reconfigure(priv);
     }
 }