From 0a24c69722e57767c85136a87d32067096ad1ad4 Mon Sep 17 00:00:00 2001 From: Panagiotis Malakoudis Date: Sat, 4 Aug 2018 16:19:08 +0300 Subject: [PATCH] ecm pid detection fix --- tables.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tables.c b/tables.c index 9f9bdc4..1c5cec1 100644 --- a/tables.c +++ b/tables.c @@ -211,7 +211,14 @@ void process_pmt(struct ts *ts, uint16_t pid, uint8_t *ts_packet) { if (ts->camd.constant_codeword) return; + // initialise used values to 0 + ts->ecm_caid = 0; + ts->ecm_pid = 0; + for (int j=0; jecm_pids[j] = 0; + // end initialising values ts->n_ecm_pids = 0; + __ts_get_ecm_info(ts->pmt, ts->req_CA_sys, ts->forced_caid, &ts->ecm_caid, &ts->ecm_pid, &ts->ecm_pids[0], &ts->n_ecm_pids); if (ts->forced_ecm_pid)