summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-24 10:51:24 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-24 10:51:24 +0000
commit6023874828599e37e14056e5fc10325adfdba50c (patch)
tree86331fba2927b1a4494b10a25f662702b61ecc11 /libmpcodecs
parent1414f844c565a5c0170bb7250eafbd84ffdb93c6 (diff)
downloadmpv-6023874828599e37e14056e5fc10325adfdba50c.tar.bz2
mpv-6023874828599e37e14056e5fc10325adfdba50c.tar.xz
Some ugly hacks to make compiling against a newer external version of libass work.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30107 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_ass.c4
-rw-r--r--libmpcodecs/vf_vo.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c
index 6e524dcd84..3f5d6e352e 100644
--- a/libmpcodecs/vf_ass.c
+++ b/libmpcodecs/vf_ass.c
@@ -94,7 +94,11 @@ 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);
+#else
ass_set_aspect_ratio(vf->priv->ass_priv, ((double)d_width) / d_height);
+#endif
}
return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width, d_height, flags, outfmt);
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index e31e5c545b..7960c3ded2 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -132,7 +132,11 @@ static int control(struct vf_instance_s* vf, int request, void* data)
if (video_out->control(VOCTRL_GET_EOSD_RES, &res) == VO_TRUE) {
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);
+#else
ass_set_aspect_ratio(vf->priv->ass_priv, (double)res.w / res.h);
+#endif
}
images.imgs = ass_mp_render_frame(vf->priv->ass_priv, ass_track, (pts+sub_delay) * 1000 + .5, &images.changed);