From 3f73166049071f28bc44192b9eedc4f3021bb76d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 29 Aug 2005 15:45:38 +0200 Subject: Fixed cDvbPlayer::SkipFrames() to properly handle radio recordings --- CONTRIBUTORS | 1 + HISTORY | 2 ++ dvbplayer.c | 7 +++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index bf2df2fd..98a23c54 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -980,6 +980,7 @@ Reinhard Nissl for modifying handling of audio packets for radio channels in remux.c for suggesting to always use stream id 0xE0 for the video stream, to avoid problems with post processing tools that choke on different ids + for fixing cDvbPlayer::SkipFrames() to properly handle radio recordings Richard Robson for reporting freezing replay if a timer starts while in Transfer Mode from the diff --git a/HISTORY b/HISTORY index f303f179..4f5cd93f 100644 --- a/HISTORY +++ b/HISTORY @@ -3757,3 +3757,5 @@ Video Disk Recorder Revision History - Now always using stream id 0xE0 for the video stream, to avoid problems with post processing tools that choke on different ids (suggested by Reinhard Nissl). - Updated the Estonian OSD texts (thanks to Arthur Konovalov). +- Fixed cDvbPlayer::SkipFrames() to properly handle radio recordings (thanks to + Reinhard Nissl). 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; -- cgit v1.2.3