summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-04-13 11:12:54 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-04-13 11:12:54 +0200
commit27c061e449729f586d07c961e43691d2bc3105cb (patch)
treeab98ed8b429b056fa9ff723297c685679bcb678f
parent3628bbbfa16288d548a4b64a67c163699c08d06f (diff)
downloadvdr-27c061e449729f586d07c961e43691d2bc3105cb.tar.gz
vdr-27c061e449729f586d07c961e43691d2bc3105cb.tar.bz2
Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets
-rw-r--r--HISTORY1
-rw-r--r--dvbplayer.c4
-rw-r--r--recording.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index a217064a..ef35e15b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6036,3 +6036,4 @@ Video Disk Recorder Revision History
- No longer checking for deleted recordings to be removed from the foreground
thread, to avoid blocking the main loop for too long (thanks to Rolf Ahrenberg).
- cDevice::PlayTs() now syncs on the TS packet sync bytes.
+- Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets.
diff --git a/dvbplayer.c b/dvbplayer.c
index 9de0fca9..322d2ff0 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 2.11 2009/04/05 13:04:33 kls Exp $
+ * $Id: dvbplayer.c 2.12 2009/04/13 11:10:50 kls Exp $
*/
#include "dvbplayer.h"
@@ -456,7 +456,7 @@ void cDvbPlayer::Action(void)
eof = true;
}
else // allows replay even if the index file is missing
- Length = MAXFRAMESIZE / TS_SIZE * TS_SIZE;// FIXME: use a linear ringbuffer in this case, and fix cDevice::PlayPes()
+ Length = MAXFRAMESIZE;
if (Length == -1)
Length = MAXFRAMESIZE; // this means we read up to EOF (see cIndex)
else if (Length > MAXFRAMESIZE) {
diff --git a/recording.h b/recording.h
index 151e7602..50992ca3 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 2.5 2009/02/28 10:50:12 kls Exp $
+ * $Id: recording.h 2.6 2009/04/13 11:10:50 kls Exp $
*/
#ifndef __RECORDING_H
@@ -207,7 +207,7 @@ public:
};
// The maximum size of a single frame (up to HDTV 1920x1080):
-#define MAXFRAMESIZE KILOBYTE(512)
+#define MAXFRAMESIZE (KILOBYTE(512) / TS_SIZE * TS_SIZE) // multiple of TS_SIZE to avoid breaking up TS packets
// The maximum file size is limited by the range that can be covered
// with a 40 bit 'unsigned int', which is 1TB. The actual maximum value