diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-svdrp-modt-recflag.diff b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-01-svdrp-modt-recflag.patch similarity index 96% rename from packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-svdrp-modt-recflag.diff rename to packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-01-svdrp-modt-recflag.patch index 696957719f..999fe2b264 100644 --- a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-svdrp-modt-recflag.diff +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-01-svdrp-modt-recflag.patch @@ -4,8 +4,8 @@ ftp://ftp.tvdr.de/vdr/Developer/Patches/vdr-2.4/ # and UPDT. The tfRecording flag must only be handled by the VDR that actually hosts # and processes the timer. # ---- svdrp.c 2018/03/19 12:16:33 5.0 -+++ svdrp.c 2018/04/19 09:45:08 +--- a/svdrp.c 2018/03/19 12:16:33 5.0 ++++ b/svdrp.c 2018/04/19 09:45:08 @@ -2036,6 +2036,7 @@ LOCK_TIMERS_WRITE; Timers->SetExplicitModify(); diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-02-invalid-locking-sequence.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-02-invalid-locking-sequence.patch new file mode 100644 index 0000000000..00db568013 --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-02-invalid-locking-sequence.patch @@ -0,0 +1,48 @@ +# This patch fixes a possible invalid locking sequence in case a remote timer handling error message +# is displayed on the OSD and the skin tries to lock the Recordings or DeletedRecordings +# list in its Flush() function (for instance by calling cVideoDiskUsage::HasChanged()). +# To do this, the call to Skins.Message() in menu.c's HandleRemoteModifications() has +# been changed to Skins.QueueMessage(), and cSkins::ProcessQueuedMessages() is now called +# unconditionally in the main loop, and checks whether the current cSkinDisplay object +# (if any) implements SetMessage(). +# +--- 1/menu.c 2018/04/14 10:24:41 5.0 ++++ 1/menu.c 2018/04/28 12:09:45 +@@ -1075,7 +1075,7 @@ + { + cString ErrorMessage; + if (!HandleRemoteTimerModifications(NewTimer, OldTimer, &ErrorMessage)) { +- Skins.Message(mtError, ErrorMessage); ++ Skins.QueueMessage(mtError, ErrorMessage); + return false; + } + return true; +--- 1/skins.c 2013/08/18 12:07:22 5.0 ++++ 1/skins.c 2018/04/28 12:13:01 +@@ -352,6 +352,14 @@ + dsyslog("cSkins::ProcessQueuedMessages() called from background thread - ignored!"); + return; + } ++ // Check whether there is a cSkinDisplay object (if any) that implements SetMessage(): ++ if (cSkinDisplay *sd = cSkinDisplay::Current()) { ++ if (!(dynamic_cast(sd) || ++ dynamic_cast(sd) || ++ dynamic_cast(sd) || ++ dynamic_cast(sd))) ++ return; ++ } + cSkinQueuedMessage *msg = NULL; + // Get the first waiting message: + queueMessageMutex.Lock(); +--- 1/vdr.c 2018/04/10 13:24:43 5.0 ++++ 1/vdr.c 2018/04/28 11:27:48 +@@ -1176,8 +1176,7 @@ + if (!Menu && !cOsd::IsOpen()) + Menu = CamControl(); + // Queued messages: +- if (!Skins.IsOpen()) +- Skins.ProcessQueuedMessages(); ++ Skins.ProcessQueuedMessages(); + // User Input: + cOsdObject *Interact = Menu ? Menu : cControl::Control(); + eKeys key = Interface->GetKey(!Interact || !Interact->NeedsFastResponse()); diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-03-locking-channel-display.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-03-locking-channel-display.patch new file mode 100644 index 0000000000..b2c1c710bf --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-03-locking-channel-display.patch @@ -0,0 +1,89 @@ +# Fixed locking the Channels list in cDisplayChannel, where the lock was still held +# when Flush() was called. +# +--- 1/menu.c 2018/04/28 12:09:45 5.1 ++++ 1/menu.c 2018/05/06 09:30:11 +@@ -4626,14 +4626,17 @@ + cOsdProvider::OsdSizeChanged(osdState); // just to get the current state + positioner = NULL; + channel = NULL; +- LOCK_CHANNELS_READ; +- channel = Channels->GetByNumber(Number); +- lastPresent = lastFollowing = NULL; +- if (channel) { +- DisplayChannel(); +- DisplayInfo(); ++ { ++ LOCK_CHANNELS_READ; ++ channel = Channels->GetByNumber(Number); ++ lastPresent = lastFollowing = NULL; ++ if (channel) { ++ DisplayChannel(); ++ DisplayInfo(); ++ } ++ } ++ if (channel) + displayChannel->Flush(); +- } + lastTime.Set(); + } + +@@ -4868,31 +4871,33 @@ + } + }; + if (positioner || !timeout || lastTime.Elapsed() < (uint64_t)(Setup.ChannelInfoTime * 1000)) { +- LOCK_CHANNELS_READ; +- if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) { +- // makes sure a channel switch through the SVDRP CHAN command is displayed +- channel = Channels->GetByNumber(cDevice::CurrentChannel()); +- Refresh(); +- lastTime.Set(); +- } +- DisplayInfo(); +- if (NewChannel) { +- SetTrackDescriptions(NewChannel->Number()); // to make them immediately visible in the channel display +- Channels->SwitchTo(NewChannel->Number()); +- SetTrackDescriptions(NewChannel->Number()); // switching the channel has cleared them +- channel = NewChannel; +- } +- const cPositioner *Positioner = cDevice::ActualDevice()->Positioner(); +- bool PositionerMoving = Positioner && Positioner->IsMoving(); +- SetNeedsFastResponse(PositionerMoving); +- if (!PositionerMoving) { +- if (positioner) +- lastTime.Set(); // to keep the channel display up a few seconds after the target position has been reached +- Positioner = NULL; +- } +- if (Positioner || positioner) // making sure we call SetPositioner(NULL) if there is a switch from "with" to "without" positioner +- displayChannel->SetPositioner(Positioner); +- positioner = Positioner; ++ { ++ LOCK_CHANNELS_READ; ++ if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) { ++ // makes sure a channel switch through the SVDRP CHAN command is displayed ++ channel = Channels->GetByNumber(cDevice::CurrentChannel()); ++ Refresh(); ++ lastTime.Set(); ++ } ++ DisplayInfo(); ++ if (NewChannel) { ++ SetTrackDescriptions(NewChannel->Number()); // to make them immediately visible in the channel display ++ Channels->SwitchTo(NewChannel->Number()); ++ SetTrackDescriptions(NewChannel->Number()); // switching the channel has cleared them ++ channel = NewChannel; ++ } ++ const cPositioner *Positioner = cDevice::ActualDevice()->Positioner(); ++ bool PositionerMoving = Positioner && Positioner->IsMoving(); ++ SetNeedsFastResponse(PositionerMoving); ++ if (!PositionerMoving) { ++ if (positioner) ++ lastTime.Set(); // to keep the channel display up a few seconds after the target position has been reached ++ Positioner = NULL; ++ } ++ if (Positioner || positioner) // making sure we call SetPositioner(NULL) if there is a switch from "with" to "without" positioner ++ displayChannel->SetPositioner(Positioner); ++ positioner = Positioner; ++ } + displayChannel->Flush(); + return osContinue; + } diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-04-locking-channel-display-2.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-04-locking-channel-display-2.patch new file mode 100644 index 0000000000..3311e664a3 --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-04-locking-channel-display-2.patch @@ -0,0 +1,18 @@ +# Fixed locking the Channels list in cDisplayChannel, where the lock was still held +# when Flush() was called (cont'd). +# +--- 1/menu.c 2018/05/06 09:30:11 5.2 ++++ 1/menu.c 2018/05/27 09:51:56 5.3 +@@ -4654,8 +4654,10 @@ + displayChannel = Skins.Current()->DisplayChannel(withInfo); + positioner = NULL; + channel = NULL; +- LOCK_CHANNELS_READ; +- channel = Channels->GetByNumber(cDevice::CurrentChannel()); ++ { ++ LOCK_CHANNELS_READ; ++ channel = Channels->GetByNumber(cDevice::CurrentChannel()); ++ } + ProcessKey(FirstKey); + } + diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-05-shutdown.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-05-shutdown.patch new file mode 100644 index 0000000000..746ec34fb2 --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-05-shutdown.patch @@ -0,0 +1,33 @@ +# Fixed shutdown after user inactivity in case a plugin is keeping the OSD open. +# +--- a/vdr.c 2018/04/28 11:27:48 5.1 ++++ b/vdr.c 2018/07/16 08:52:40 5.2 +@@ -1514,9 +1514,7 @@ + ShutdownHandler.countdown.Cancel(); + } + +- if ((Now - LastInteract) > ACTIVITYTIMEOUT && !cRecordControls::Active() && !RecordingsHandler.Active() && (Now - cRemote::LastActivity()) > ACTIVITYTIMEOUT) { +- // Handle housekeeping tasks +- ++ if (!cRecordControls::Active() && !RecordingsHandler.Active() && (Now - cRemote::LastActivity()) > ACTIVITYTIMEOUT) { + // Shutdown: + // Check whether VDR will be ready for shutdown in SHUTDOWNWAIT seconds: + time_t Soon = Now + SHUTDOWNWAIT; +@@ -1535,7 +1533,8 @@ + // Do this again a bit later: + ShutdownHandler.SetRetry(SHUTDOWNRETRY); + } +- ++ // Handle housekeeping tasks ++ if ((Now - LastInteract) > ACTIVITYTIMEOUT) { + // Disk housekeeping: + RemoveDeletedRecordings(); + ListGarbageCollector.Purge(); +@@ -1543,6 +1542,7 @@ + // Plugins housekeeping: + PluginManager.Housekeeping(); + } ++ } + + ReportEpgBugFixStats(); + diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-06-channel-switch.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-06-channel-switch.patch new file mode 100644 index 0000000000..9a8662b10c --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-06-channel-switch.patch @@ -0,0 +1,31 @@ +# Fixed switching through encrypted channels with the Up/Down keys +# +--- a/device.c 2018/03/24 09:49:14 5.0 ++++ b/device.c 2018/07/16 09:29:57 +@@ -787,6 +787,7 @@ + if (LiveView) { + isyslog("switching to channel %d %s (%s)", Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name()); + cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer ++ // and, if decrypted, this removes the now superflous PIDs from the CAM, too + } + for (int i = 3; i--;) { + switch (SetChannel(Channel, LiveView)) { +@@ -809,6 +810,7 @@ + Direction = sgn(Direction); + if (Direction) { + cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer ++ // and, if decrypted, this removes the now superflous PIDs from the CAM, too + int n = CurrentChannel() + Direction; + int first = n; + LOCK_CHANNELS_READ; +--- a/menu.c 2018/05/27 09:51:56 5.3 ++++ b/menu.c 2018/07/16 09:29:57 +@@ -4704,6 +4704,8 @@ + const cChannel *cDisplayChannel::NextAvailableChannel(const cChannel *Channel, int Direction) + { + if (Direction) { ++ cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer ++ // and, if decrypted, this removes the now superflous PIDs from the CAM, too + LOCK_CHANNELS_READ; + while (Channel) { + Channel = Direction > 0 ? Channels->Next(Channel) : Channels->Prev(Channel); diff --git a/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-07-disabling-mtd.patch b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-07-disabling-mtd.patch new file mode 100644 index 0000000000..4e97a6c598 --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-10-upstream-fix-07-disabling-mtd.patch @@ -0,0 +1,13 @@ +# Now deactivating MTD support if a non MCD capable CAM is inserted after removing +# a previously used CAM that is MCD capable. +# +--- a/ci.c 2018/03/19 16:37:03 5.0 ++++ b/ci.c 2018/09/23 10:17:20 +@@ -1213,6 +1213,7 @@ + } + else { + dsyslog("CAM %d: doesn't reply to QUERY - only a single channel can be decrypted", CamSlot()->SlotNumber()); ++ CamSlot()->MtdActivate(false); + state = 4; // normal operation + } + }