From: Chris Tallon Date: Sun, 11 Jun 2006 20:39:32 +0000 (+0000) Subject: Fixes (1) for new frame number navigation X-Git-Tag: r0-2-4~8 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=b9bfc681f477eae3e8b565fef86088f49c807eb5;p=vompclient.git Fixes (1) for new frame number navigation --- 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);