mirror of https://github.com/odrling/Aegisub
Fix seeking to previous keyframe when the current frame is not a keyframe
Originally committed to SVN as r6163.
This commit is contained in:
parent
7adbe07b4e
commit
04990e8694
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue