summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2009-07-01 00:16:20 +0200
committerGrigori Goronzy <greg@blackbox>2009-07-01 00:16:20 +0200
commite035b236cf3ddf49880fc6f60555ea89bb8744e6 (patch)
treefcd8927892a6e83d0c512e12be111b445d7736d3
parent4f8cbf58fca94d035bbda5cc9abdd12046b2ace6 (diff)
downloadlibass-e035b236cf3ddf49880fc6f60555ea89bb8744e6.tar.bz2
libass-e035b236cf3ddf49880fc6f60555ea89bb8744e6.tar.xz
Assume pixel ratio equals aspect ratio
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.
-rw-r--r--libass/ass_render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 9d727cdd..07096f82 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -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);
}
}