1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed the locking sequence when starting an instant recording

This commit is contained in:
Klaus Schmidinger 2017-06-07 15:41:12 +02:00
parent c0b8666d1f
commit 081e9eb45f
2 changed files with 5 additions and 3 deletions

View File

@ -9108,3 +9108,4 @@ Video Disk Recorder Revision History
- Fixed false positives when checking the locking sequence, in case of nested locks - Fixed false positives when checking the locking sequence, in case of nested locks
within the same thread. within the same thread.
- Fixed uninitialized variable SdWatchdog in vdr.c (reported by Frank Neumann). - Fixed uninitialized variable SdWatchdog in vdr.c (reported by Frank Neumann).
- Fixed the locking sequence when starting an instant recording.

7
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 4.32 2017/06/04 09:30:56 kls Exp $ * $Id: menu.c 4.33 2017/06/07 15:36:52 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -5061,6 +5061,7 @@ eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key)
cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer, bool Pause) cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer, bool Pause)
{ {
const char *LastReplayed = cReplayControl::LastReplayed(); // must do this before locking schedules!
// Whatever happens here, the timers will be modified in some way... // Whatever happens here, the timers will be modified in some way...
Timers->SetModified(); Timers->SetModified();
// We're going to work with an event here, so we need to prevent // We're going to work with an event here, so we need to prevent
@ -5098,7 +5099,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
} }
else { else {
Timers->Del(timer); Timers->Del(timer);
if (!cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() if (!LastReplayed) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
cReplayControl::SetRecording(fileName); cReplayControl::SetRecording(fileName);
} }
timer = NULL; timer = NULL;
@ -5114,7 +5115,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
if (device->AttachReceiver(recorder)) { if (device->AttachReceiver(recorder)) {
Recording.WriteInfo(); Recording.WriteInfo();
cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true); cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true);
if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() if (!Timer && !LastReplayed) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
cReplayControl::SetRecording(fileName); cReplayControl::SetRecording(fileName);
SchedulesStateKey.Remove(); SchedulesStateKey.Remove();
LOCK_RECORDINGS_WRITE; LOCK_RECORDINGS_WRITE;