summaryrefslogtreecommitdiff
path: root/cutter.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-24 15:24:19 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-24 15:24:19 +0100
commitf01af488e1063871e8392bced356eb7196a5040f (patch)
tree00ca482c8cb119e4455e61c5d3f0ec9c14d49271 /cutter.c
parent85e34776ff520d001cb6e0236a3308f143f093f0 (diff)
downloadvdr-f01af488e1063871e8392bced356eb7196a5040f.tar.gz
vdr-f01af488e1063871e8392bced356eb7196a5040f.tar.bz2
Fixed handling the maximum video file size
Diffstat (limited to 'cutter.c')
-rw-r--r--cutter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cutter.c b/cutter.c
index 20a9e676..73ac873f 100644
--- a/cutter.c
+++ b/cutter.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: cutter.c 2.1 2009/01/06 14:40:48 kls Exp $
+ * $Id: cutter.c 2.2 2009/01/24 15:19:26 kls Exp $
*/
#include "cutter.h"
@@ -22,6 +22,7 @@ private:
cFileName *fromFileName, *toFileName;
cIndexFile *fromIndex, *toIndex;
cMarks fromMarks, toMarks;
+ off_t maxVideoFileSize;
protected:
virtual void Action(void);
public:
@@ -45,6 +46,9 @@ cCuttingThread::cCuttingThread(const char *FromFileName, const char *ToFileName)
fromIndex = new cIndexFile(FromFileName, false, isPesRecording);
toIndex = new cIndexFile(ToFileName, true, isPesRecording);
toMarks.Load(ToFileName, Recording.FramesPerSecond(), isPesRecording); // doesn't actually load marks, just sets the file name
+ maxVideoFileSize = MEGABYTE(Setup.MaxVideoFileSize);
+ if (isPesRecording && maxVideoFileSize > MEGABYTE(MAXVIDEOFILESIZEPES))
+ maxVideoFileSize = MEGABYTE(MAXVIDEOFILESIZEPES);
Start();
}
else
@@ -125,7 +129,7 @@ void cCuttingThread::Action(void)
if (Independent) { // every file shall start with an independent frame
if (LastMark) // edited version shall end before next I-frame
break;
- if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
+ if (FileSize > maxVideoFileSize) {
toFile = toFileName->NextFile();
if (!toFile) {
error = "toFile 1";