diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-01-16 14:11:40 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-01-16 14:11:40 +0100 |
commit | ae41be85c812de20bc38f4b99030cdf277ddeec6 (patch) | |
tree | 5f509af78eb8fd3a7e24d9328800a7a57651f894 /recording.c | |
parent | e7936c8595f183cc0a916a27ff1ac613419a6b92 (diff) | |
download | vdr-ae41be85c812de20bc38f4b99030cdf277ddeec6.tar.gz vdr-ae41be85c812de20bc38f4b99030cdf277ddeec6.tar.bz2 |
Moved any locking from cutter.c into recording.c
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/recording.c b/recording.c index 0dd4da5f..bb99d219 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 4.16 2018/01/16 11:09:26 kls Exp $ + * $Id: recording.c 4.17 2018/01/16 14:07:04 kls Exp $ */ #include "recording.h" @@ -1908,6 +1908,7 @@ bool cRecordingsHandlerEntry::Active(cRecordings *Recordings) // Now check if there is something to start: if ((Usage() & ruPending) != 0) { if ((Usage() & ruCut) != 0) { + Recordings->AddByName(FileNameDst(), false); cutter = new cCutter(FileNameSrc()); cutter->Start(); } @@ -1932,6 +1933,14 @@ bool cRecordingsHandlerEntry::Active(cRecordings *Recordings) void cRecordingsHandlerEntry::Cleanup(cRecordings *Recordings) { + if ((usage & ruCut)) { // this was a cut operation... + if (cutter) { // ...which had not yet ended + delete cutter; + cutter = NULL; + } + cVideoDirectory::RemoveVideoFile(fileNameDst); + Recordings->DelByName(fileNameDst); + } if ((usage & (ruMove | ruCopy)) // this was a move/copy operation... && ((usage & ruPending) // ...which had not yet started... || copier // ...or not yet finished... |