summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-20 02:10:32 +0100
committerwm4 <wm4@nowhere>2013-03-20 02:10:32 +0100
commit5c9efa109eb9027334b730a42471ee1ec2ed4c9a (patch)
tree32e248642c86fece481e02fe6655e508d5e70eeb
parent085666a08f4f287e5c3575c64397265599d06fa9 (diff)
downloadlibass-5c9efa109eb9027334b730a42471ee1ec2ed4c9a.tar.bz2
libass-5c9efa109eb9027334b730a42471ee1ec2ed4c9a.tar.xz
Fix crazy VSFilter behavior for \move tag
Fixes issue 90 (both cases).
-rw-r--r--libass/ass_parse.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index 3dcdf48..712cd96 100644
--- a/libass/ass_parse.c
+++ b/libass/ass_parse.c
@@ -418,6 +418,7 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr)
mystrtod(&p, &x2);
skip(',');
mystrtod(&p, &y2);
+ t1 = t2 = 0;
if (*p == ',') {
skip(',');
mystrtoll(&p, &t1);
@@ -427,7 +428,14 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr)
"movement6: (%f, %f) -> (%f, %f), (%" PRId64 " .. %"
PRId64 ")\n", x1, y1, x2, y2, (int64_t) t1,
(int64_t) t2);
- } else {
+ // VSFilter
+ if (t1 > t2) {
+ double tmp = t2;
+ t2 = t1;
+ t1 = tmp;
+ }
+ }
+ if (t1 <= 0 && t2 <= 0) {
t1 = 0;
t2 = render_priv->state.event->Duration;
ass_msg(render_priv->library, MSGL_DBG2,