summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-07-28 11:41:51 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-07-28 11:41:51 +0200
commitab4e3c7ef8fe6ae252abbb06f0a605e5ea159467 (patch)
treec07d7c1b5a2af4a45b005a44a7b4d6cae0bb6496
parent780cd3d52f1ca4654d62ec7a30902bd6fc83e597 (diff)
downloadvdr-ab4e3c7ef8fe6ae252abbb06f0a605e5ea159467.tar.gz
vdr-ab4e3c7ef8fe6ae252abbb06f0a605e5ea159467.tar.bz2
Fixed replaying in case there is no index file
-rw-r--r--HISTORY1
-rw-r--r--dvbapi.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index e782f354..7449a6c6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -587,3 +587,4 @@ Video Disk Recorder Revision History
may be necessary if your multiswitch gets irritated by the default DiSEqC
codes '0' (thanks to Markus Lang).
- Avoiding audio/video distortions in 'Transfer Mode'.
+- Fixed replaying in case there is no index file.
diff --git a/dvbapi.c b/dvbapi.c
index fbb8b62d..39c579cf 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.91 2001/07/28 11:23:59 kls Exp $
+ * $Id: dvbapi.c 1.92 2001/07/28 11:38:21 kls Exp $
*/
#include "dvbapi.h"
@@ -735,7 +735,7 @@ void cReplayBuffer::Input(void)
r = ReadFrame(replayFile, b, Length, sizeof(b));
StripAudioPackets(b, r);
}
- else {
+ else if (index) {
lastIndex = -1;
playIndex = (playIndex >= 0) ? playIndex + 1 : index->Get(fileName.Number(), fileOffset);
uchar FileNumber;
@@ -745,6 +745,8 @@ void cReplayBuffer::Input(void)
r = ReadFrame(replayFile, b, Length, sizeof(b));
StripAudioPackets(b, r, audioTrack);
}
+ else // allows replay even if the index file is missing
+ r = read(replayFile, b, sizeof(b));
if (r > 0) {
uchar *p = b;
while (r > 0 && Busy() && !blockInput) {