Jump to the end of the video rather than the frame before the current one when trying to seek to the next keyframe after the last keyframe

Originally committed to SVN as r6031.
This commit is contained in:
Thomas Goyne 2011-12-22 21:14:24 +00:00
parent bf7e4d5cc1
commit ac9b09b847

View file

@ -383,7 +383,7 @@ struct video_frame_next_keyframe : public validator_video_loaded {
std::vector<int> const& kf = c->videoController->GetKeyFrames();
std::vector<int>::const_iterator pos = lower_bound(kf.begin(), kf.end(), c->videoController->GetFrameN() + 1);
c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetFrameN() - 1 : *pos);
c->videoController->JumpToFrame(pos == kf.end() ? c->videoController->GetLength() - 1 : *pos);
}
};