Changed the behaviour when hitting the end of a recording in fast forward mode

This commit is contained in:
Klaus Schmidinger
2006-04-09 13:57:39 +02:00
parent 765f8267a5
commit a452010760
5 changed files with 21 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 1.43 2006/02/19 14:20:15 kls Exp $
* $Id: dvbplayer.c 1.44 2006/04/09 13:47:11 kls Exp $
*/
#include "dvbplayer.h"
@@ -399,12 +399,19 @@ void cDvbPlayer::Action(void)
if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
uchar FileNumber;
int FileOffset;
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, true);
bool TimeShiftMode = index->IsStillRecording();
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, TimeShiftMode);
if (Index >= 0) {
if (!NextFile(FileNumber, FileOffset))
continue;
}
else {
if (!TimeShiftMode && playDir == pdForward) {
// hit end of recording: signal end of file but don't change playMode
readIndex = -1;
eof = true;
continue;
}
// hit begin of recording: wait for device buffers to drain
// before changing play mode:
if (!DeviceFlush(100))