From 1f176b7645318ec5d3f0e2dee81986b14eb8f1c2 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 29 Jun 2009 04:17:24 +0200 Subject: [PATCH] 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. --- libass/ass_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0