Fix seeking to previous keyframe when the current frame is not a keyframe

Originally committed to SVN as r6163.
This commit is contained in:
Thomas Goyne 2011-12-26 22:20:57 +00:00
parent 7adbe07b4e
commit 04990e8694
1 changed files with 1 additions and 1 deletions

View File

@ -455,7 +455,7 @@ struct video_frame_prev_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(), frame);
if (frame != 0 && (pos == kf.end() || *pos == frame))
if (pos != kf.begin())
--pos;
c->videoController->JumpToFrame(*pos);