summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-25 07:24:39 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-26 20:22:43 +0300
commit546c3fb53ce64fde5cba3e06012d244e73ae497a (patch)
tree8708989ac0b06edc091a71d73508ffc465fd669e /libmpcodecs
parent6fbcf16cfb0c6482bef87a0e8ac2162bca4cdbfd (diff)
downloadmpv-546c3fb53ce64fde5cba3e06012d244e73ae497a.tar.bz2
mpv-546c3fb53ce64fde5cba3e06012d244e73ae497a.tar.xz
Remove internal libass tree
Remove the libass/ directory and use the newest standalone version of the library instead.
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_ass.c5
-rw-r--r--libmpcodecs/vf_vo.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c
index b13b148600..4c2f9bef7c 100644
--- a/libmpcodecs/vf_ass.c
+++ b/libmpcodecs/vf_ass.c
@@ -42,8 +42,7 @@
#include "m_option.h"
#include "m_struct.h"
-#include "libass/ass.h"
-#include "libass/ass_mp.h"
+#include "ass_mp.h"
#define _r(c) ((c)>>24)
#define _g(c) (((c)>>16)&0xFF)
@@ -97,7 +96,7 @@ static int config(struct vf_instance* vf,
if (vf->priv->ass_priv) {
ass_configure(vf->priv->ass_priv, vf->priv->outw, vf->priv->outh, 0);
- ass_set_aspect_ratio(vf->priv->ass_priv, ((double)d_width) / d_height);
+ ass_set_aspect_ratio(vf->priv->ass_priv, 1, 1);
}
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 2e4257fb21..6ec5904053 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -12,8 +12,7 @@
#include "libvo/video_out.h"
#ifdef CONFIG_ASS
-#include "libass/ass.h"
-#include "libass/ass_mp.h"
+#include "ass_mp.h"
extern ass_track_t* ass_track;
#endif
@@ -28,6 +27,7 @@ struct vf_priv_s {
#ifdef CONFIG_ASS
ass_renderer_t* ass_priv;
int prev_visibility;
+ double scale_ratio;
#endif
};
#define video_out (vf->priv->vo)
@@ -67,6 +67,8 @@ static int config(struct vf_instance* vf,
return 0;
#ifdef CONFIG_ASS
+ vf->priv->scale_ratio = (double) d_width / d_height * height / width;
+
if (vf->priv->ass_priv)
ass_configure(vf->priv->ass_priv, width, height, !!(vf->default_caps & VFCAP_EOSD_UNSCALED));
#endif
@@ -133,7 +135,7 @@ static int control(struct vf_instance* vf, int request, void* data)
if (vo_control(video_out, 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);
- ass_set_aspect_ratio(vf->priv->ass_priv, (double)res.w / res.h);
+ ass_set_aspect_ratio(vf->priv->ass_priv, vf->priv->scale_ratio, 1);
}
images.imgs = ass_mp_render_frame(vf->priv->ass_priv, ass_track, (pts+sub_delay) * 1000 + .5, &images.changed);