From ca7997a50cf06885a54f4d548696f10188576e43 Mon Sep 17 00:00:00 2001 From: uau Date: Mon, 5 Feb 2007 23:25:50 +0000 Subject: 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 --- subreader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'subreader.c') 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 -- cgit v1.2.3