Fix bug where seeking to the next keyframe would actually seek to the keyframe after the next keyframe
Originally committed to SVN as r6030.
This commit is contained in:
parent
95fe6a523f
commit
bf7e4d5cc1
1 changed files with 1 additions and 2 deletions
|
@ -381,8 +381,7 @@ struct video_frame_next_keyframe : public validator_video_loaded {
|
||||||
|
|
||||||
void operator()(agi::Context *c) {
|
void operator()(agi::Context *c) {
|
||||||
std::vector<int> const& kf = c->videoController->GetKeyFrames();
|
std::vector<int> const& kf = c->videoController->GetKeyFrames();
|
||||||
std::vector<int>::const_iterator pos = lower_bound(kf.begin(), kf.end(), c->videoController->GetFrameN());
|
std::vector<int>::const_iterator pos = lower_bound(kf.begin(), kf.end(), c->videoController->GetFrameN() + 1);
|
||||||
if (pos != kf.end()) ++pos;
|
|
||||||
|
|
||||||
c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetFrameN() - 1 : *pos);
|
c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetFrameN() - 1 : *pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue