Fixed deleting the edited recording in case of an error

This commit is contained in:
Klaus Schmidinger 2021-06-21 15:30:16 +02:00
parent a84f9a8e19
commit 6c5a448dec
3 changed files with 10 additions and 5 deletions

View File

@ -2452,6 +2452,7 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
for making the 'Edit path' dialog also show the total size of all recordings in that path
for suggesting to make cRecordingInfo::Errors() return -1 for old recordings, and
reporting a missing 'const'
for reporting that the edited recording is not deleted in case of an error
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present

View File

@ -9720,7 +9720,7 @@ Video Disk Recorder Revision History
- Removed unused declaration of cDvbTuner::SetFrontendType() (thanks to Helmut Binder).
- Fixed handling incomplete multi-packet CAT (thanks to Helmut Binder).
2021-06-20:
2021-06-21:
- Fixed restarting PMT pids after starting a recording on the currently viewed channel
(with help from Helmut Binder).
@ -9732,3 +9732,4 @@ Video Disk Recorder Revision History
- When checking whether a recording has already been made, recording names are now
compared case insensitive.
- Improved responsiveness in cSectionHandler::Action() (thanks to Helmut Binder).
- Fixed deleting the edited recording in case of an error (reported by Christoph Haubrich).

View File

@ -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);
}