From db469b41973f24d6647d1e42478c6e8cc30cbbbf Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Thu, 21 Sep 2006 21:17:09 +0000 Subject: [PATCH] Fixed getCurrentFrameNumber, which has also fixed the gui --- player.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/player.cc b/player.cc index adb1063..374d52f 100644 --- a/player.cc +++ b/player.cc @@ -133,7 +133,18 @@ ULONG Player::getLengthFrames() ULONG Player::getCurrentFrameNum() { if (startup) return 0; - return demuxer->getFrameNumFromPTS(video->getCurrentTimestamp()); + switch(state) + { + case S_PLAY: + case S_PAUSE_P: + return demuxer->getFrameNumFromPTS(video->getCurrentTimestamp()); + case S_PAUSE_I: + case S_FFWD: + case S_FBWD: + return currentFrameNumber; + default: + return 0; // shouldn't happen + } } // ----------------------------------- Externally called events -- 2.39.5