changeset 22141:ed81b9614148

Fix code updating subtitle array which only moved the text, not endpts. Led to multiple subtitles on screen disappearing too early without -ass.
author uau
date Mon, 05 Feb 2007 23:25:50 +0000
parents 0cd17afe1d4b
children 84f95595f31f
files subreader.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Mon Feb 05 19:24:03 2007 +0000
+++ b/subreader.c	Mon Feb 05 23:25:50 2007 +0000
@@ -2336,8 +2336,10 @@
     if (pts == MP_NOPTS_VALUE || (endpts != MP_NOPTS_VALUE && pts >= endpts)) {
       int j;
       free(sub->text[i]);
-      for (j = i + 1; j < sub->lines; j++)
+      for (j = i + 1; j < sub->lines; j++) {
         sub->text[j - 1] = sub->text[j];
+        sub->endpts[j - 1] = sub->endpts[j];
+      }
       sub->lines--;
       changed = 1;
     } else