summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-25 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-25 18:00:00 +0200
commita2a215d5e12ad35df8d0731dd00b6e41d5dd77fa (patch)
treecb13aa5088a06e52ca9ef762224ed1708e19465f /dvbplayer.c
parented643353b100bee75459c4ef2d0330e7a04e1f2a (diff)
downloadvdr-patch-lnbsharing-a2a215d5e12ad35df8d0731dd00b6e41d5dd77fa.tar.gz
vdr-patch-lnbsharing-a2a215d5e12ad35df8d0731dd00b6e41d5dd77fa.tar.bz2
Version 1.1.8vdr-1.1.8
- Fixed replaying the last few seconds of a recording. - Added some missing #includes to files in libdtv for gcc 3.2 (thanks to Jürgen Zimmermann). - Added cDevice::NewOsd() to allow a derived cDevice class to implement its own OSD capabilities (thanks to Andreas Schultz). - Added cPalette::AllColors() for plugins that need to get the color entries of a cPalette (see osdbase.h). - The new SVDRP command CLRE can be used to clear the entire EPG data (suggested by Matthias Schniedermeyer). - Fixed handling one-shot timers that were already recording and had their start time changed into the future (thanks to Matthias Schniedermeyer for reporting this one).
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index 2ca5a62..7a6d76d 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.11 2002/08/16 09:16:38 kls Exp $
+ * $Id: dvbplayer.c 1.12 2002/08/24 14:59:35 kls Exp $
*/
#include "dvbplayer.h"
@@ -307,7 +307,7 @@ void cDvbPlayer::Action(void)
isyslog("resuming replay at index %d (%s)", readIndex, IndexToHMSF(readIndex, true));
running = true;
- while (running && NextFile()) {
+ while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available())) {
cPoller Poller;
if (!readFrame)
Poller.Add(replayFile, false);
@@ -317,7 +317,7 @@ void cDvbPlayer::Action(void)
// Read the next frame from the file:
- if (!readFrame) {
+ if (!readFrame && (replayFile >= 0 || readIndex >= 0)) {
if (playMode != pmStill) {
int r = 0;
if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
@@ -326,7 +326,7 @@ void cDvbPlayer::Action(void)
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, true);
if (Index >= 0) {
if (!NextFile(FileNumber, FileOffset))
- break;
+ continue;
}
else {
// can't call Play() here, because those functions may only be
@@ -347,8 +347,11 @@ void cDvbPlayer::Action(void)
uchar FileNumber;
int FileOffset, Length;
readIndex++;
- if (!(index->Get(readIndex, &FileNumber, &FileOffset, NULL, &Length) && NextFile(FileNumber, FileOffset)))
- break;
+ if (!(index->Get(readIndex, &FileNumber, &FileOffset, NULL, &Length) && NextFile(FileNumber, FileOffset))) {
+ readIndex = -1;
+ eof = true;
+ continue;
+ }
r = ReadFrame(replayFile, b, Length, sizeof(b));
}
else // allows replay even if the index file is missing
@@ -557,7 +560,7 @@ void cDvbPlayer::SkipSeconds(int Seconds)
if (Index > 0)
Index = index->GetNextIFrame(Index, false, NULL, NULL, NULL, true);
if (Index >= 0)
- readIndex = writeIndex = Index - 1; // Input() will first increment it!
+ readIndex = writeIndex = Index - 1; // Action() will first increment it!
}
Play();
}