mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling the "CA PMT" generation (cont'd)
This commit is contained in:
parent
68d59e2921
commit
0faae7c3f0
6
ci.c
6
ci.c
@ -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 2.5 2010/01/01 13:38:02 kls Exp $
|
* $Id: ci.c 2.6 2010/01/02 10:39:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ci.h"
|
#include "ci.h"
|
||||||
@ -638,7 +638,8 @@ void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)
|
|||||||
void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
|
void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
|
||||||
{
|
{
|
||||||
if (esInfoLengthPos) {
|
if (esInfoLengthPos) {
|
||||||
if (length + Length <= int(sizeof(capmt))) {
|
if (length + Length < int(sizeof(capmt))) {
|
||||||
|
if (Length || cmdId == CPCI_QUERY) {
|
||||||
capmt[length++] = cmdId;
|
capmt[length++] = cmdId;
|
||||||
memcpy(capmt + length, Data, Length);
|
memcpy(capmt + length, Data, Length);
|
||||||
length += Length;
|
length += Length;
|
||||||
@ -646,6 +647,7 @@ void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
|
|||||||
capmt[esInfoLengthPos] = (l >> 8) & 0xFF;
|
capmt[esInfoLengthPos] = (l >> 8) & 0xFF;
|
||||||
capmt[esInfoLengthPos + 1] = l & 0xFF;
|
capmt[esInfoLengthPos + 1] = l & 0xFF;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: buffer overflow in CA descriptor");
|
esyslog("ERROR: buffer overflow in CA descriptor");
|
||||||
esInfoLengthPos = 0;
|
esInfoLengthPos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user