/* Elementary stream types */
uint8_t ct_types[MAX_PIDS];
+ uint8_t ct_type_sok[MAX_PIDS];
} capmt_service_t;
/**
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) {
if (adapter != ct->ct_adapter)
continue;
+ multipid = descrambler_multi_pid((th_descrambler_t *)ct);
+
pids = cai->pids;
for (i = 0; i < MAX_PIDS; i++) {
pid = ct->ct_pids[j];
if (pid == 0) break;
if (pid == pids[i]) {
- if (descrambler_multi_pid((th_descrambler_t *)ct)) {
+ if (multipid) {
descrambler_keys((th_descrambler_t *)ct, type, pid, even, odd);
continue;
- }
- goto found;
+ } else if (ct->ct_type_sok[j])
+ goto found;
}
}
}
if (st->es_pid != ct->ct_pids[i] || type != ct->ct_types[i]) {
ct->ct_pids[i] = st->es_pid;
ct->ct_types[i] = type;
+ /* mark as valid for !multipid - TELETEXT may be shared */
+ ct->ct_type_sok[i] = SCT_ISVIDEO(st->es_type) ||
+ SCT_ISAUDIO(st->es_type) ||
+ st->es_type == SCT_DVBSUB;
return 1;
}