diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-06-21 15:30:16 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-06-21 15:30:16 +0200 |
commit | 6c5a448dec029f4d72629662cb2d1869dfec3f35 (patch) | |
tree | 0589d5bfbd779d264fe9b80f808fe98fb47defa5 /recording.c | |
parent | a84f9a8e19da395d134dc39f8328f3565628e925 (diff) | |
download | vdr-6c5a448dec029f4d72629662cb2d1869dfec3f35.tar.gz vdr-6c5a448dec029f4d72629662cb2d1869dfec3f35.tar.bz2 |
Fixed deleting the edited recording in case of an error
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/recording.c b/recording.c index 24cc175c..f9ff14b1 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 5.11 2021/06/20 10:03:28 kls Exp $ + * $Id: recording.c 5.12 2021/06/21 15:30:16 kls Exp $ */ #include "recording.h" @@ -1968,9 +1968,12 @@ 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; + if (cutter // ...which had not yet ended... + || error) { // ...or finished with error + if (cutter) { + delete cutter; + cutter = NULL; + } cVideoDirectory::RemoveVideoFile(fileNameDst); Recordings->DelByName(fileNameDst); } |