Actions
Bug #5097
closedMultipid not detected properly
Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Descrambling
Target version:
-
Start date:
2018-05-02
Due date:
% Done:
0%
Estimated time:
Found in version:
4.3 commit 2a36607d7
Affected Versions:
Description
I finally updated from c1a5e43 to the latest git and descrambling failed for multipid (extended_cw) channels. Errors reported that keys were not found. At first I thought it may be related to switching from ffdecsa to dvbcsa, but I worked my way back and found the problem started with changes to capmt.c in commit 2a36607d7 ([[https://github.com/tvheadend/tvheadend/commit/2a36607d7df4d3f7087ac47305f723af0adfdeb8#diff-84c61f754429bea32ae72788ca1f4c0b]] )
If I reverse these changes, descrambling works again for multipid channels. (tested with latest 4.3-1252~g595fd17)
diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c
index dcce0d8..c99ea77 100644
--- a/src/descrambler/capmt.c
+++ b/src/descrambler/capmt.c
@@ -190,7 +190,6 @@ typedef struct capmt_service {
/* PIDs list */
uint16_t ct_pids[MAX_PIDS];
- uint8_t ct_multipid;
/* Elementary stream types */
uint8_t ct_types[MAX_PIDS];
@@ -1118,7 +1117,7 @@ capmt_process_key(capmt_t *capmt, uint8_t adapter, ca_info_t *cai,
mpegts_service_t *t;
capmt_service_t *ct;
uint16_t *pids;
- int i, j, pid;
+ int i, j, pid, multipid;
pthread_mutex_lock(&capmt->capmt_mutex);
LIST_FOREACH(ct, &capmt->capmt_services, ct_link) {
@@ -1137,6 +1136,8 @@ capmt_process_key(capmt_t *capmt, uint8_t adapter, ca_info_t *cai,
if (adapter != ct->ct_adapter)
continue;
+ multipid = descrambler_multi_pid((th_descrambler_t *)ct);
+
pids = cai->pids;
for (i = 0; i < MAX_PIDS; i++) {
@@ -1145,7 +1146,7 @@ capmt_process_key(capmt_t *capmt, uint8_t adapter, ca_info_t *cai,
pid = ct->ct_pids[j];
if (pid == 0) break;
if (pid == pids[i]) {
- if (ct->ct_multipid) {
+ if (multipid) {
ct->ct_ok_flag = 1;
descrambler_keys((th_descrambler_t *)ct, type, pid, even, odd);
continue;
@@ -2457,7 +2458,6 @@ capmt_service_start(caclient_t *cac, service_t *s)
ct = calloc(1, sizeof(capmt_service_t));
ct->ct_capmt = capmt;
ct->ct_adapter = tuner;
- ct->ct_multipid = descrambler_multi_pid((th_descrambler_t *)ct);
i = 0;
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
Since nobody else has reported this, it is possible it is due to something unique in my configuration, but I am not sure what???
Actions