mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-12-26 23:06:44 +01:00
Fixed an 'invalid lock sequence' when deleting the timeshift timer
This commit is contained in:
3
HISTORY
3
HISTORY
@@ -10138,7 +10138,7 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed an invalid lock sequence when pressing the Channel+/Channel- keys while in the
|
- Fixed an invalid lock sequence when pressing the Channel+/Channel- keys while in the
|
||||||
"What's on..." menu in live view.
|
"What's on..." menu in live view.
|
||||||
|
|
||||||
2025-07-21:
|
2025-07-22:
|
||||||
|
|
||||||
- Fixed cPoller::Poll() to allow negative timeout values again.
|
- Fixed cPoller::Poll() to allow negative timeout values again.
|
||||||
- When regenerating the index of a recording, PID changes are now taken into account
|
- When regenerating the index of a recording, PID changes are now taken into account
|
||||||
@@ -10173,3 +10173,4 @@ Video Disk Recorder Revision History
|
|||||||
- If an SVDRP peer connection is lost, the connection in the opposite direction is now also
|
- If an SVDRP peer connection is lost, the connection in the opposite direction is now also
|
||||||
closed (reported by Markus Ehrnsperger).
|
closed (reported by Markus Ehrnsperger).
|
||||||
- Shutdown now takes into account the VPS margin (reported by Christoph Haubrich).
|
- Shutdown now takes into account the VPS margin (reported by Christoph Haubrich).
|
||||||
|
- Fixed an 'invalid lock sequence' when deleting the timeshift timer.
|
||||||
|
|||||||
30
menu.c
30
menu.c
@@ -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 5.31 2025/07/06 15:06:55 kls Exp $
|
* $Id: menu.c 5.32 2025/07/22 21:10:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@@ -5725,6 +5725,7 @@ int cAdaptiveSkipper::GetValue(eKeys Key)
|
|||||||
|
|
||||||
// --- cReplayControl --------------------------------------------------------
|
// --- cReplayControl --------------------------------------------------------
|
||||||
|
|
||||||
|
cTimer *cReplayControl::timeshiftTimer = NULL;
|
||||||
cReplayControl *cReplayControl::currentReplayControl = NULL;
|
cReplayControl *cReplayControl::currentReplayControl = NULL;
|
||||||
cString cReplayControl::fileName;
|
cString cReplayControl::fileName;
|
||||||
|
|
||||||
@@ -5760,6 +5761,18 @@ cReplayControl::~cReplayControl()
|
|||||||
currentReplayControl = NULL;
|
currentReplayControl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cReplayControl::DelTimeshiftTimer(void)
|
||||||
|
{
|
||||||
|
if (timeshiftTimer) {
|
||||||
|
LOCK_TIMERS_WRITE;
|
||||||
|
Timers->SetExplicitModify();
|
||||||
|
Timers->Del(timeshiftTimer);
|
||||||
|
Timers->SetModified();
|
||||||
|
isyslog("deleted timer %s", *timeshiftTimer->ToDescr());
|
||||||
|
timeshiftTimer = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cReplayControl::Stop(void)
|
void cReplayControl::Stop(void)
|
||||||
{
|
{
|
||||||
Hide();
|
Hide();
|
||||||
@@ -5769,17 +5782,10 @@ void cReplayControl::Stop(void)
|
|||||||
if (rc && rc->InstantId()) {
|
if (rc && rc->InstantId()) {
|
||||||
if (Active()) {
|
if (Active()) {
|
||||||
if (Setup.DelTimeshiftRec == 2 || Interface->Confirm(tr("Delete timeshift recording?"))) {
|
if (Setup.DelTimeshiftRec == 2 || Interface->Confirm(tr("Delete timeshift recording?"))) {
|
||||||
{
|
// At this point somewhere up the call stack there may be a lock on the Channels, so we can't
|
||||||
LOCK_TIMERS_WRITE;
|
// lock the Timers here and have to delete this timer later:
|
||||||
Timers->SetExplicitModify();
|
timeshiftTimer = rc->Timer();
|
||||||
cTimer *Timer = rc->Timer();
|
rc->Stop(false); // don't execute user command
|
||||||
rc->Stop(false); // don't execute user command
|
|
||||||
if (Timer) {
|
|
||||||
Timers->Del(Timer);
|
|
||||||
Timers->SetModified();
|
|
||||||
isyslog("deleted timer %s", *Timer->ToDescr());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cDvbPlayerControl::Stop();
|
cDvbPlayerControl::Stop();
|
||||||
bool Error = false;
|
bool Error = false;
|
||||||
{
|
{
|
||||||
|
|||||||
4
menu.h
4
menu.h
@@ -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.h 5.6 2025/03/02 11:03:35 kls Exp $
|
* $Id: menu.h 5.7 2025/07/22 21:10:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MENU_H
|
#ifndef __MENU_H
|
||||||
@@ -292,6 +292,7 @@ public:
|
|||||||
|
|
||||||
class cReplayControl : public cDvbPlayerControl {
|
class cReplayControl : public cDvbPlayerControl {
|
||||||
private:
|
private:
|
||||||
|
static cTimer *timeshiftTimer;
|
||||||
cSkinDisplayReplay *displayReplay;
|
cSkinDisplayReplay *displayReplay;
|
||||||
cAdaptiveSkipper adaptiveSkipper;
|
cAdaptiveSkipper adaptiveSkipper;
|
||||||
cMarks marks;
|
cMarks marks;
|
||||||
@@ -322,6 +323,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
cReplayControl(bool PauseLive = false);
|
cReplayControl(bool PauseLive = false);
|
||||||
virtual ~cReplayControl() override;
|
virtual ~cReplayControl() override;
|
||||||
|
static void DelTimeshiftTimer(void);
|
||||||
void Stop(void);
|
void Stop(void);
|
||||||
virtual cOsdObject *GetInfo(void) override;
|
virtual cOsdObject *GetInfo(void) override;
|
||||||
virtual const cRecording *GetRecording(void) override;
|
virtual const cRecording *GetRecording(void) override;
|
||||||
|
|||||||
4
vdr.c
4
vdr.c
@@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at https://www.tvdr.de
|
* The project's page is at https://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 5.20 2025/07/06 15:06:55 kls Exp $
|
* $Id: vdr.c 5.21 2025/07/22 21:10:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@@ -1594,6 +1594,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cReplayControl::DelTimeshiftTimer();
|
||||||
|
|
||||||
ReportEpgBugFixStats();
|
ReportEpgBugFixStats();
|
||||||
|
|
||||||
// Main thread hooks of plugins:
|
// Main thread hooks of plugins:
|
||||||
|
|||||||
Reference in New Issue
Block a user