From e035b236cf3ddf49880fc6f60555ea89bb8744e6 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Wed, 1 Jul 2009 00:16:20 +0200 Subject: 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. --- libass/ass_render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libass/ass_render.c b/libass/ass_render.c index 9d727cd..07096f8 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); } } -- cgit v1.2.3