[MPlayer-cvslog] r30530 - in trunk/libmpcodecs: vf_ass.c vf_vo.c

greg subversion at mplayerhq.hu
Tue Feb 9 18:36:24 CET 2010


Author: greg
Date: Tue Feb  9 18:36:24 2010
New Revision: 30530

Log:
libass: fix PAR correction

Modified:
   trunk/libmpcodecs/vf_ass.c
   trunk/libmpcodecs/vf_vo.c

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	Tue Feb  9 09:46:07 2010	(r30529)
+++ trunk/libmpcodecs/vf_ass.c	Tue Feb  9 18:36:24 2010	(r30530)
@@ -95,9 +95,9 @@ static int config(struct vf_instance_s* 
 	if (vf->priv->ass_priv) {
 		ass_configure(vf->priv->ass_priv, vf->priv->outw, vf->priv->outh, 0);
 #if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00908000
-		ass_set_aspect_ratio(vf->priv->ass_priv, ((double)d_width) / d_height, ((double)width) / height);
+		ass_set_aspect_ratio(vf->priv->ass_priv, 1, 1);
 #else
-		ass_set_aspect_ratio(vf->priv->ass_priv, ((double)d_width) / d_height);
+		ass_set_aspect_ratio(vf->priv->ass_priv, 1);
 #endif
 	}
 

Modified: trunk/libmpcodecs/vf_vo.c
==============================================================================
--- trunk/libmpcodecs/vf_vo.c	Tue Feb  9 09:46:07 2010	(r30529)
+++ trunk/libmpcodecs/vf_vo.c	Tue Feb  9 18:36:24 2010	(r30530)
@@ -148,10 +148,11 @@ static int control(struct vf_instance_s*
             mp_eosd_res_t res;
             memset(&res, 0, sizeof(res));
             if (video_out->control(VOCTRL_GET_EOSD_RES, &res) == VO_TRUE) {
+                double dar = (double) (res.w - res.ml - res.mr) / (res.h - res.mt - res.mb);
                 ass_set_frame_size(vf->priv->ass_priv, res.w, res.h);
                 ass_set_margins(vf->priv->ass_priv, res.mt, res.mb, res.ml, res.mr);
 #if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00908000
-                ass_set_aspect_ratio(vf->priv->ass_priv, (double)res.w / res.h, (double)res.srcw/res.srch);
+                ass_set_aspect_ratio(vf->priv->ass_priv, dar, (double)res.srcw/res.srch);
 #else
                 ass_set_aspect_ratio(vf->priv->ass_priv, (double)res.w / res.h);
 #endif


More information about the MPlayer-cvslog mailing list