From: Grigori Goronzy Date: Mon, 29 Jun 2009 02:17:24 +0000 (+0200) Subject: Handle conflicting \t time intervals X-Git-Tag: 0.9.7~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f176b7645318ec5d3f0e2dee81986b14eb8f1c2;p=libass Handle conflicting \t time intervals If end <= start for a time interval specification, set end to the end of the event. VSFilter handles it like that, too. --- diff --git a/libass/ass_render.c b/libass/ass_render.c index c779f3b..86dfd3d 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1269,11 +1269,11 @@ static char *parse_tag(ass_renderer_t *render_priv, char *p, double pwr) } if (cnt == 3) { v1 = v[0]; - v2 = v[1]; + v2 = (v[1] <= v1) ? render_priv->state.event->Duration : v[1]; v3 = v[2]; } else if (cnt == 2) { v1 = v[0]; - v2 = v[1]; + v2 = (v[1] <= v1) ? render_priv->state.event->Duration : v[1]; v3 = 1.; } else if (cnt == 1) { v1 = 0;