From: Jaroslav Kysela Date: Tue, 17 May 2016 06:23:55 +0000 (+0200) Subject: capmt: little optimization X-Git-Tag: v4.2.1~499 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7985a96184a613ac5fdd523a7728bc613521e2ab;p=thirdparty%2Ftvheadend.git capmt: little optimization --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 0a52d8452..10d82c166 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1916,7 +1916,8 @@ capmt_caid_change(th_descrambler_t *td) i = 0; TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) { if (i < MAX_PIDS && SCT_ISAV(st->es_type)) { - if (i == 0) change = 1; + /* we use this first A/V PID in the PMT message */ + if (i == 0 && ct->ct_pids[i] != st->es_pid) change = 1; ct->ct_pids[i++] = st->es_pid; } if (t->s_dvb_prefcapid_lock == PREFCAPID_FORCE && @@ -2290,7 +2291,7 @@ fin: pthread_mutex_unlock(&capmt->capmt_mutex); if (change) - capmt_notify_server(capmt, NULL, (change >> 1) & 1); + capmt_notify_server(capmt, NULL, 0); }