1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed updating the checksum in the CA table after mapping EMM PIDs for MTD

This commit is contained in:
Klaus Schmidinger 2019-05-05 18:35:15 +02:00
parent 0f10c8824c
commit 16f18cbce8
3 changed files with 20 additions and 7 deletions

View File

@ -3580,6 +3580,7 @@ Helmut Binder <cco@aon.at>
for reporting a bug in processing SI::T2DeliverySystemDescriptor when typecasting it for reporting a bug in processing SI::T2DeliverySystemDescriptor when typecasting it
over an SI::ExtensionDescriptor over an SI::ExtensionDescriptor
for fixing mapping SIDs in MTD 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> Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is for reporting a problem with shutdown after user inactivity in case a plugin is

View File

@ -9395,3 +9395,5 @@ Video Disk Recorder Revision History
list of (deleted) recordings and thus won't display too much empty disk space. 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 the install target in case of multiple jobs (thanks to Chris Mayo).
- Fixed mapping SIDs in MTD (thanks to Helmut Binder). - 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).

22
ci.c
View File

@ -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: 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" #include "ci.h"
@ -225,7 +225,7 @@ void cCaPidReceiver::Receive(const uchar *Data, int Length)
} }
else { else {
esyslog("ERROR: buffer overflow in cCaPidReceiver::Receive()"); esyslog("ERROR: buffer overflow in cCaPidReceiver::Receive()");
bufp = 0; bufp = NULL;
length = 0; length = 0;
} }
} }
@ -250,13 +250,23 @@ void cCaPidReceiver::Receive(const uchar *Data, int Length)
i += p[i + 1] + 2 - 1; // -1 to compensate for the loop increment i += p[i + 1] + 2 - 1; // -1 to compensate for the loop increment
} }
} }
p = NULL; if (MtdCamSlot) {
bufp = 0; if (!bufp && length) {
length = 0; // 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); memcpy(mtdCatBuffer, Data, TS_SIZE);
if (MtdCamSlot)
MtdCamSlot->PutCat(mtdCatBuffer, TS_SIZE); MtdCamSlot->PutCat(mtdCatBuffer, TS_SIZE);
} }
p = NULL;
bufp = NULL;
length = 0;
}
} }
} }