From 04990e8694c6596b4ac67a3e1bc700109badb0e5 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 26 Dec 2011 22:20:57 +0000 Subject: [PATCH] Fix seeking to previous keyframe when the current frame is not a keyframe Originally committed to SVN as r6163. --- aegisub/src/command/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/command/video.cpp b/aegisub/src/command/video.cpp index 5430c87ea..45b73a756 100644 --- a/aegisub/src/command/video.cpp +++ b/aegisub/src/command/video.cpp @@ -455,7 +455,7 @@ struct video_frame_prev_keyframe : public validator_video_loaded { std::vector const& kf = c->videoController->GetKeyFrames(); std::vector::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);