Fixed a possible deadlock when canceling an editing process

This commit is contained in:
Klaus Schmidinger 2025-01-10 13:12:04 +01:00
parent 7ab94c7bcb
commit de5327a048
2 changed files with 8 additions and 4 deletions

View File

@ -10034,7 +10034,7 @@ Video Disk Recorder Revision History
(suggested by Stefan Hofmann).
- Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann).
2025-01-07:
2025-01-10:
- Removed all DEPRECATED_* code.
- Fixed error checking in case the fps value can't be determined by the frame parser.
@ -10047,3 +10047,4 @@ Video Disk Recorder Revision History
- Fixed handling the fps value if it can't be determined from the video data.
- Fixed accessing a timer's event schedule in case the event has been removed from the
schedule.
- Fixed a possible deadlock when canceling an editing process.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: cutter.c 5.3 2024/09/20 21:34:18 kls Exp $
* $Id: cutter.c 5.4 2025/01/10 13:12:04 kls Exp $
*/
#include "cutter.h"
@ -623,8 +623,11 @@ void cCuttingThread::HandleErrors(bool Force)
Force = true;
}
if (Force) {
LOCK_RECORDINGS_WRITE;
Recordings->UpdateByName(editedRecordingName);
cStateKey StateKey;
if (cRecordings *Recordings = cRecordings::GetRecordingsWrite(StateKey, 1)) {
Recordings->UpdateByName(editedRecordingName);
StateKey.Remove();
}
}
lastErrorHandling = time(NULL);
}