diff --git a/src/descrambler/emm_reass.c b/src/descrambler/emm_reass.c index 8f66edc..91b40d4 100644 --- a/src/descrambler/emm_reass.c +++ b/src/descrambler/emm_reass.c @@ -91,14 +91,20 @@ emm_irdeto emm_provider_t *ep; char prov[4]; - if (len < 4) + if (len < 4) { + tvhtrace(ra->subsys, "if (%d < 4) return",len); return; + } emm_mode = data[3] >> 3; emm_len = data[3] & 0x07; - if (4 + emm_len > len || emm_len > 3) + tvhtrace(ra->subsys, "EMM_IRDETO len:%d emm_mode:%d emm_len:%d", len, emm_mode, emm_len); + + if (4 + emm_len > len || emm_len > 3) { + tvhtrace(ra->subsys, "if (%d > %d || %d > %d) return", 4 + emm_len, len, emm_len, 3); return; + } if (emm_mode & 0x10) { // try to match card @@ -123,8 +129,8 @@ emm_irdeto } } } - - if (match) + tvhtrace(ra->subsys, "match=%d send(len=%d)",match, len); + if (match==0) send(aux, data, len, mux); } @@ -604,6 +610,7 @@ emm_filter(emm_reass_t *ra, const uint8_t *data, int len, void *mux, tvhtrace(ra->subsys, "emm filter : %s - len %d mux %p", caid2name(ra->caid), len, mux); tvhlog_hexdump(ra->subsys, data, len); if (ra->do_emm) + tvhtrace(ra->subsys, "do_emm: %d", ra->type); ra->do_emm(ra, data, len, mux, send, aux); }