summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-12 10:44:58 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-12 10:44:58 +0100
commit35f73199d4a8ecc82479ebc6a3f5ba4f9cd28f75 (patch)
tree9149e1c1ea7932b6db2f7342354d0cf7fee4b3f2 /ci.c
parent34c79fdc503a2e63bc9907f68d77f2c4dd781a0c (diff)
downloadvdr-35f73199d4a8ecc82479ebc6a3f5ba4f9cd28f75.tar.gz
vdr-35f73199d4a8ecc82479ebc6a3f5ba4f9cd28f75.tar.bz2
Fixed resetting the receiver for EMM pids for CAMs that need to receive the TS (cont'd)
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ci.c b/ci.c
index fc50071e..73618fb5 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 3.14 2015/01/09 09:41:20 kls Exp $
+ * $Id: ci.c 3.15 2015/01/12 10:44:58 kls Exp $
*/
#include "ci.h"
@@ -123,7 +123,7 @@ public:
virtual ~cCaPidReceiver() { Detach(); }
virtual void Receive(uchar *Data, int Length);
bool HasCaPids(void) { return NumPids() - emmPids.Size() - 1 > 0; }
- void Reset(void) { DelEmmPids(); }
+ void Reset(void) { DelEmmPids(); catVersion = -1; }
};
cCaPidReceiver::cCaPidReceiver(void)
@@ -163,6 +163,9 @@ void cCaPidReceiver::Receive(uchar *Data, int Length)
if (v != catVersion) {
if (Data[11] == 0 && Data[12] == 0) { // section number, last section number
if (l <= TS_SIZE - 8) {
+ cDevice *AttachedDevice = Device();
+ if (AttachedDevice)
+ AttachedDevice->Detach(this);
DelEmmPids();
for (int i = 13; i < l + 8 - 4; i++) { // +8 = header, -4 = checksum
if (Data[i] == 0x09) {
@@ -179,6 +182,8 @@ void cCaPidReceiver::Receive(uchar *Data, int Length)
i += Data[i + 1] - 1; // -1 to compensate for the loop increment
}
}
+ if (AttachedDevice)
+ AttachedDevice->AttachReceiver(this);
}
else
dsyslog("multi packet CAT section - unhandled!");