diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-20 10:09:05 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-20 10:09:05 +0200 |
commit | e5d2240bbb98f24212213df92ad3ca3e1cf1e0e7 (patch) | |
tree | 4437cc31dde9ca4b95e0f73f2e27d8110a14170d /cutter.c | |
parent | 12f60ee151ca1cecf37d768eb62eb7a13fe61641 (diff) | |
download | vdr-e5d2240bbb98f24212213df92ad3ca3e1cf1e0e7.tar.gz vdr-e5d2240bbb98f24212213df92ad3ca3e1cf1e0e7.tar.bz2 |
The start time of an edited recording is now set to the time of the first editing mark
Diffstat (limited to 'cutter.c')
-rw-r--r-- | cutter.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |