summaryrefslogtreecommitdiff
path: root/cutter.c
diff options
context:
space:
mode:
Diffstat (limited to 'cutter.c')
-rw-r--r--cutter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cutter.c b/cutter.c
index 96739fdd..725adc51 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.6 2011/03/06 14:54:33 kls Exp $
+ * $Id: cutter.c 2.7 2011/08/20 09:57:27 kls Exp $
*/
#include "cutter.h"
@@ -208,6 +208,12 @@ bool cCutter::Start(const char *FileName)
error = false;
ended = false;
cRecording Recording(FileName);
+
+ cMarks FromMarks;
+ FromMarks.Load(FileName);
+ if (cMark *First = FromMarks.First())
+ Recording.SetStartTime(Recording.start + (int(First->position / Recording.FramesPerSecond() + 30) / 60) * 60);
+
const char *evn = Recording.PrefixFileName('%');
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
// XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)