Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb ca: set proper pmt message length for CAM (fix for the mpegt…
…s table code update)
  • Loading branch information
perexg committed May 30, 2015
1 parent 46e83b8 commit 90b2571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/descrambler/dvbcam.c
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/input/mpegts/dvb_psi.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 90b2571

Please sign in to comment.