]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Fixes (1) for new frame number navigation
authorChris Tallon <chris@vomp.tv>
Sun, 11 Jun 2006 20:39:32 +0000 (20:39 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 11 Jun 2006 20:39:32 +0000 (20:39 +0000)
player.cc
vvideorec.cc

index 66a31d11aaaedddc7c0d05eae675b2db8c080c44..628bbf5818a036ae498cea04f7c311e8087c5569 100644 (file)
--- 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)
index 5c1db8647fcf5e2cbc8561146a9d98213d839f36..9580abae84b3fdfda0a1a0a227c5df4ef128e848 100644 (file)
@@ -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);