From: wm4 Date: Wed, 20 Mar 2013 01:10:32 +0000 (+0100) Subject: Fix crazy VSFilter behavior for \move tag X-Git-Tag: 0.10.2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c9efa109eb9027334b730a42471ee1ec2ed4c9a;p=libass Fix crazy VSFilter behavior for \move tag Fixes issue 90 (both cases). --- 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,