]> granicus.if.org Git - libass/commitdiff
Animations: allow equal start and end time
authorGrigori Goronzy <greg@blackbox>
Mon, 20 Jul 2009 22:04:24 +0000 (00:04 +0200)
committerGrigori Goronzy <greg@blackbox>
Mon, 20 Jul 2009 22:04:24 +0000 (00:04 +0200)
Do not set the end time of the animation to the end time of the event
in case end time and start time specified in a \t tag are equal.
This should sort out a problem introduced by commit 1f176b.

libass/ass_render.c

index f86c73e95634d179e444fc8deacbaad0744699e9..f2c137d4ecc1e33894b5fa54eef6bacb978b098c 100644 (file)
@@ -1572,11 +1572,11 @@ static char *parse_tag(ass_renderer_t *render_priv, char *p, double pwr)
         }
         if (cnt == 3) {
             v1 = v[0];
-            v2 = (v[1] <= v1) ? render_priv->state.event->Duration : 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] <= v1) ? render_priv->state.event->Duration : v[1];
+            v2 = (v[1] < v1) ? render_priv->state.event->Duration : v[1];
             v3 = 1.;
         } else if (cnt == 1) {
             v1 = 0;