summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-06-07 15:41:12 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-06-07 15:41:12 +0200
commit081e9eb45f739f23a275fbb1a46532a8dd1ec8f9 (patch)
treedbba60e540ad10ebba23bb6fcd0c8ef152098418
parentc0b8666d1fe1a5f83ba7a09ad68fcc6e811b7e12 (diff)
downloadvdr-081e9eb45f739f23a275fbb1a46532a8dd1ec8f9.tar.gz
vdr-081e9eb45f739f23a275fbb1a46532a8dd1ec8f9.tar.bz2
Fixed the locking sequence when starting an instant recording
-rw-r--r--HISTORY1
-rw-r--r--menu.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index bf4d62e1..ef899d1b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9108,3 +9108,4 @@ Video Disk Recorder Revision History
- Fixed false positives when checking the locking sequence, in case of nested locks
within the same thread.
- Fixed uninitialized variable SdWatchdog in vdr.c (reported by Frank Neumann).
+- Fixed the locking sequence when starting an instant recording.
diff --git a/menu.c b/menu.c
index 366390f5..2aacc419 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@@ -5061,6 +5061,7 @@ eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key)
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...
Timers->SetModified();
// 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 {
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);
}
timer = NULL;
@@ -5114,7 +5115,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
if (device->AttachReceiver(recorder)) {
Recording.WriteInfo();
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);
SchedulesStateKey.Remove();
LOCK_RECORDINGS_WRITE;