summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-08-29 15:45:38 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-08-29 15:45:38 +0200
commit3f73166049071f28bc44192b9eedc4f3021bb76d (patch)
tree1ec8fc525914277994d9a442f67f8fe7146fa4da /dvbplayer.c
parent97b65c6645cc91a2067d6558b484d59edffb19cb (diff)
downloadvdr-3f73166049071f28bc44192b9eedc4f3021bb76d.tar.gz
vdr-3f73166049071f28bc44192b9eedc4f3021bb76d.tar.bz2
Fixed cDvbPlayer::SkipFrames() to properly handle radio recordings
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index e160697a..8f76ab6c 100644
--- a/dvbplayer.c
+++ b/dvbplayer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbplayer.c 1.39 2005/08/28 21:14:04 kls Exp $
+ * $Id: dvbplayer.c 1.40 2005/08/29 15:43:30 kls Exp $
*/
#include "dvbplayer.h"
@@ -621,7 +621,10 @@ int cDvbPlayer::SkipFrames(int Frames)
int Current, Total;
GetIndex(Current, Total, true);
int OldCurrent = Current;
- Current = index->GetNextIFrame(Current + Frames, Frames > 0);
+ // As GetNextIFrame() increments/decrements at least once, the
+ // destination frame (= Current + Frames) must be adjusted by
+ // -1/+1 respectively.
+ Current = index->GetNextIFrame(Current + Frames + (Frames > 0 ? -1 : 1), Frames > 0);
return Current >= 0 ? Current : OldCurrent;
}
return -1;