From: Jaroslav Kysela Date: Sat, 30 May 2015 20:04:57 +0000 (+0200) Subject: linuxdvb ca: set proper pmt message length for CAM (fix for the mpegts table code... X-Git-Tag: v4.2.1~2415 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90b25711cab60813974492cc46267d203e666a60;p=thirdparty%2Ftvheadend.git linuxdvb ca: set proper pmt message length for CAM (fix for the mpegts table code update) --- diff --git a/src/descrambler/dvbcam.c b/src/descrambler/dvbcam.c index 360e87c58..273997b77 100644 --- a/src/descrambler/dvbcam.c +++ b/src/descrambler/dvbcam.c @@ -141,9 +141,9 @@ dvbcam_pmt_data(mpegts_service_t *s, const uint8_t *ptr, int len) is_update = 1; } - as->last_pmt = malloc(len + 3); - memcpy(as->last_pmt, ptr-3, len + 3); - as->last_pmt_len = len + 3; + as->last_pmt = malloc(len); + memcpy(as->last_pmt, ptr, len); + as->last_pmt_len = len; /*if this is update just send updated CAPMT to CAM */ if (is_update) { diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index b2ff96cbf..bb3bf94b4 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -986,7 +986,8 @@ dvb_pmt_callback service_restart((service_t*)s); #if ENABLE_LINUXDVB_CA - dvbcam_pmt_data(s, ptr, len); + /* DVBCAM requires full pmt data including header and crc */ + dvbcam_pmt_data(s, ptr - 3, len + 3 + 4); #endif /* Finish */