1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

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
This commit is contained in:
uau 2007-02-05 23:25:50 +00:00
parent 2225b00ca6
commit ca7997a50c

View File

@ -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