summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-05 23:25:50 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-05 23:25:50 +0000
commitca7997a50cf06885a54f4d548696f10188576e43 (patch)
tree1fabfda97dfc5877391d76af65713c43282219b3 /subreader.c
parent2225b00ca61c4fb7ed2e1cbd1bcfd65e63be9cb8 (diff)
downloadmpv-ca7997a50cf06885a54f4d548696f10188576e43.tar.bz2
mpv-ca7997a50cf06885a54f4d548696f10188576e43.tar.xz
Fix code updating subtitle array which only moved the text, not endpts.
Led to multiple subtitles on screen disappearing too early without -ass. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22159 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/subreader.c b/subreader.c
index 91d3707bc3..03db411b02 100644
--- a/subreader.c
+++ b/subreader.c
@@ -2336,8 +2336,10 @@ int sub_clear_text(subtitle *sub, double pts) {
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