libass: fix PAR correction

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30530 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
greg 2010-02-09 17:36:24 +00:00
parent 5c10618fa1
commit 5cbce43341
2 changed files with 4 additions and 3 deletions

View File

@ -95,9 +95,9 @@ static int config(struct vf_instance_s* vf,
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
}

View File

@ -148,10 +148,11 @@ static int control(struct vf_instance_s* vf, int request, void* data)
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