avformat/sccdec: only change duration for last subtitle

This commit is contained in:
Paul B Mahol 2019-12-23 22:47:27 +01:00
parent 13bffa7969
commit a13af9aee1
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,7 @@ try_again:
sub->pos = current_pos;
sub->pts = ts_start;
sub->duration = FFMAX(1200, ts_end - ts_start);
sub->duration = ts_end - ts_start;
memmove(line, line2, sizeof(line));
current_pos = next_pos;
line2[0] = 0;
@ -147,6 +147,7 @@ try_again:
if (line[0]) {
ts_start = ts_end;
ts_end += 1200;
goto try_again;
}