From: Mark Calderbank Date: Sun, 11 Feb 2007 20:18:41 +0000 (+0000) Subject: Step back a bit when going from ffwd to play X-Git-Tag: r0-2-6b-f1~24 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=8ae2b8f9b4d8211286fe0279a22feffe5c060d18;p=vompclient.git Step back a bit when going from ffwd to play --- diff --git a/player.cc b/player.cc index ef2c0f9..b47ef45 100644 --- a/player.cc +++ b/player.cc @@ -20,6 +20,8 @@ #include "player.h" +#define USER_RESPONSE_TIME 500 // Milliseconds + // ----------------------------------- Called from outside, one offs or info funcs Player::Player(MessageQueue* tmessageQueue, void* tmessageReceiver, bool tIsRecording) @@ -546,6 +548,11 @@ void Player::switchState(UCHAR toState, ULONG jumpFrame) case S_PLAY: // to S_PLAY { state = S_PLAY; + ULONG stepback = USER_RESPONSE_TIME * video->getFPS() * ifactor / 1000; + if (stepback < currentFrameNumber) + currentFrameNumber -= stepback; + else + currentFrameNumber = 0; restartAtFrame(currentFrameNumber); return; }