mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +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:
parent
2225b00ca6
commit
ca7997a50c
@ -2336,8 +2336,10 @@ int sub_clear_text(subtitle *sub, double pts) {
|
|||||||
if (pts == MP_NOPTS_VALUE || (endpts != MP_NOPTS_VALUE && pts >= endpts)) {
|
if (pts == MP_NOPTS_VALUE || (endpts != MP_NOPTS_VALUE && pts >= endpts)) {
|
||||||
int j;
|
int j;
|
||||||
free(sub->text[i]);
|
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->text[j - 1] = sub->text[j];
|
||||||
|
sub->endpts[j - 1] = sub->endpts[j];
|
||||||
|
}
|
||||||
sub->lines--;
|
sub->lines--;
|
||||||
changed = 1;
|
changed = 1;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user