summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2019-05-05 18:35:15 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2019-05-05 18:35:15 +0200
commit16f18cbce84b7160c96b33b618dd00ddd8791246 (patch)
tree4a0187695b0b4d612ff8167398652d8ecaf033b6
parent0f10c8824c780cdab960aa432297f8bb34dcf769 (diff)
downloadvdr-16f18cbce84b7160c96b33b618dd00ddd8791246.tar.gz
vdr-16f18cbce84b7160c96b33b618dd00ddd8791246.tar.bz2
Fixed updating the checksum in the CA table after mapping EMM PIDs for MTD
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--ci.c22
3 files changed, 19 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 786b6804..8e859412 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3580,6 +3580,7 @@ Helmut Binder <cco@aon.at>
for reporting a bug in processing SI::T2DeliverySystemDescriptor when typecasting it
over an SI::ExtensionDescriptor
for fixing mapping SIDs in MTD
+ for fixing updating the checksum in the CA table after mapping EMM PIDs for MTD
Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is
diff --git a/HISTORY b/HISTORY
index b8cb2373..ef14e620 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9395,3 +9395,5 @@ Video Disk Recorder Revision History
list of (deleted) recordings and thus won't display too much empty disk space.
- Fixed the install target in case of multiple jobs (thanks to Chris Mayo).
- Fixed mapping SIDs in MTD (thanks to Helmut Binder).
+- Fixed updating the checksum in the CA table after mapping EMM PIDs for MTD (thanks to
+ Helmut Binder).
diff --git a/ci.c b/ci.c
index a8b065c5..88194986 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 4.23 2019/03/19 14:58:06 kls Exp $
+ * $Id: ci.c 4.24 2019/05/05 14:15:56 kls Exp $
*/
#include "ci.h"
@@ -225,7 +225,7 @@ void cCaPidReceiver::Receive(const uchar *Data, int Length)
}
else {
esyslog("ERROR: buffer overflow in cCaPidReceiver::Receive()");
- bufp = 0;
+ bufp = NULL;
length = 0;
}
}
@@ -250,12 +250,22 @@ void cCaPidReceiver::Receive(const uchar *Data, int Length)
i += p[i + 1] + 2 - 1; // -1 to compensate for the loop increment
}
}
+ if (MtdCamSlot) {
+ if (!bufp && length) {
+ // update crc32 - but only single packet CAT is handled for now:
+ uint32_t crc = SI::CRC32::crc32((const char *)p - 8, length + 8 - 4, 0xFFFFFFFF); // <TableIdCAT....>[crc32]
+ uchar *c = const_cast<uchar *>(p + length - 4);
+ *c++ = crc >> 24;
+ *c++ = crc >> 16;
+ *c++ = crc >> 8;
+ *c++ = crc;
+ }
+ memcpy(mtdCatBuffer, Data, TS_SIZE);
+ MtdCamSlot->PutCat(mtdCatBuffer, TS_SIZE);
+ }
p = NULL;
- bufp = 0;
+ bufp = NULL;
length = 0;
- memcpy(mtdCatBuffer, Data, TS_SIZE);
- if (MtdCamSlot)
- MtdCamSlot->PutCat(mtdCatBuffer, TS_SIZE);
}
}
}