Backport subtitle generation fix
This commit is contained in:
parent
081adfb565
commit
30fe476014
1 changed files with 3 additions and 3 deletions
|
@ -139,14 +139,14 @@ namespace
|
|||
for(uint64_t i = 1; i < lastframe; i++) {
|
||||
moviefile_subtiming posmarker(i);
|
||||
auto j = our_movie.subtitles.upper_bound(posmarker);
|
||||
if(j == our_movie.subtitles.end() || !j->first.inrange(i))
|
||||
if(j == our_movie.subtitles.end())
|
||||
continue;
|
||||
if(lasttxt != j->second) {
|
||||
if(lasttxt != j->second || !j->first.inrange(i)) {
|
||||
if(lasttxt != "")
|
||||
y << "{" << since << "}{" << i - 1 << "}" << s_subescape(lasttxt)
|
||||
<< std::endl;
|
||||
since = i;
|
||||
lasttxt = j->second;
|
||||
lasttxt = j->first.inrange(i) ? j->second : "";
|
||||
}
|
||||
}
|
||||
if(lasttxt != "")
|
||||
|
|
Loading…
Add table
Reference in a new issue