From b9bfc681f477eae3e8b565fef86088f49c807eb5 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 11 Jun 2006 20:39:32 +0000 Subject: [PATCH] Fixes (1) for new frame number navigation --- player.cc | 4 ++-- vvideorec.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/player.cc b/player.cc index 66a31d1..628bbf5 100644 --- a/player.cc +++ b/player.cc @@ -446,9 +446,9 @@ void Player::skipForwardInt(int seconds) void Player::skipBackwardInt(int seconds) { logger->log("Player", Log::DEBUG, "SKIP BACKWARD %i SECONDS", seconds); - long newFrameNum = getCurrentFrameNum() + (seconds * video->getFPS()); + long newFrameNum = getCurrentFrameNum() - (seconds * video->getFPS()); if (newFrameNum < 0) newFrameNum = 0; - restartAt(newFrameNum); + restartAtFrame(newFrameNum); } void Player::jumpToPercentInt(int percent) diff --git a/vvideorec.cc b/vvideorec.cc index 5c1db86..9580aba 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -412,13 +412,13 @@ void VVideoRec::drawBarClocks() double pos01; int posPix; - pos01 = ((double)startMargin * video->getFPS()) / lengthFrames; + pos01 = (startMargin * video->getFPS()) / (double)lengthFrames; posPix = (int)(302 * pos01); rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT); rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT); - pos01 = lengthFrames - (endMargin * video->getFPS()) / lengthFrames; + pos01 = (lengthFrames - (endMargin * video->getFPS())) / (double)lengthFrames; posPix = (int)(302 * pos01); rectangle(barRegion.x + 352 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT); -- 2.39.5