summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-06-08 14:57:26 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-06-08 14:57:26 +0200
commit7b1c09795897282cf6bde0e9742814494f6407a1 (patch)
treedd912d1214deaa4a9682bdbdbe92704e616f8e41 /device.c
parent58e21d8e374206531802b64ae0e5c260e2bf6bf7 (diff)
downloadvdr-7b1c09795897282cf6bde0e9742814494f6407a1.tar.gz
vdr-7b1c09795897282cf6bde0e9742814494f6407a1.tar.bz2
No longer permanently looping through PMT PIDs, which caused problems with some SatIP receivers
Diffstat (limited to 'device.c')
-rw-r--r--device.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/device.c b/device.c
index b2a85944..7a5eb3ce 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 5.2 2021/03/17 10:59:36 kls Exp $
+ * $Id: device.c 5.3 2021/06/08 14:57:26 kls Exp $
*/
#include "device.h"
@@ -858,6 +858,13 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
cStatus::MsgChannelSwitch(this, 0, LiveView);
if (LiveView) {
+ if (IsPrimaryDevice() && !Replaying() && !Transferring()) { // this is only for FF DVB cards!
+ LOCK_CHANNELS_READ;
+ if (const cChannel *ch = Channels->GetByNumber(currentChannel)) {
+ if (patFilter)
+ patFilter->Release(ch->Sid());
+ }
+ }
StopReplay();
DELETENULL(liveSubtitle);
DELETENULL(dvbSubtitleConverter);
@@ -898,8 +905,6 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (SetChannelDevice(Channel, LiveView)) {
// Start section handling:
if (sectionHandler) {
- if (patFilter)
- patFilter->Trigger(Channel->Sid());
sectionHandler->SetChannel(Channel);
sectionHandler->SetStatus(true);
}
@@ -913,6 +918,8 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (Result == scrOk) {
if (LiveView && IsPrimaryDevice()) {
+ if (patFilter) // this is only for FF DVB cards!
+ patFilter->Request(Channel->Sid());
currentChannel = Channel->Number();
// Set the available audio tracks:
ClrAvailableTracks();
@@ -1807,6 +1814,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
dsyslog("CAM %d: %sknown to decrypt channel %s (scramblingTimeout = %ds)", camSlot->MasterSlotNumber(), KnownToDecrypt ? "" : "not ", *Receiver->ChannelID().ToString(), Receiver->scramblingTimeout);
}
}
+ if (patFilter && Receiver->ChannelID().Valid())
+ patFilter->Request(Receiver->ChannelID().Sid());
Start();
return true;
}
@@ -1827,6 +1836,8 @@ void cDevice::Detach(cReceiver *Receiver)
else if (receiver[i])
receiversLeft = true;
}
+ if (patFilter && Receiver->ChannelID().Valid())
+ patFilter->Release(Receiver->ChannelID().Sid());
mutexReceiver.Unlock();
Receiver->device = NULL;
Receiver->Activate(false);