Originally committed to SVN as r285.
This commit is contained in:
parent
639cbd9400
commit
7b1d152677
1 changed files with 5 additions and 1 deletions
|
@ -412,7 +412,8 @@ std::vector<int> PRSSubtitleFormat::GetFrameRanges() {
|
|||
size_t end = VFR_Output.GetFrameAtTime(diag->End.GetMS(),false);
|
||||
|
||||
// Ensure that the vector is long enough
|
||||
if (frames.size() <= end) frames.resize(end+1);
|
||||
// Yes, +2, this is an optimization for something below
|
||||
if (frames.size() <= end) frames.resize(end+2);
|
||||
|
||||
// Fill data
|
||||
// 2 = Store this frame
|
||||
|
@ -439,6 +440,9 @@ std::vector<int> PRSSubtitleFormat::GetFrameRanges() {
|
|||
frames[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Ends right before another "1" block, so make this a "2"
|
||||
if (i == end && frames[i+1] == 1) frames[i] = 2;
|
||||
}
|
||||
|
||||
// Clean up
|
||||
|
|
Loading…
Reference in a new issue