From: Jaroslav Kysela Date: Sat, 14 May 2016 17:56:02 +0000 (+0200) Subject: capmt: improve ECM PID changes notification for server X-Git-Tag: v4.2.1~505 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9364230187330749c5d557737a83717c9e69ee29;p=thirdparty%2Ftvheadend.git capmt: improve ECM PID changes notification for server --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index cd60aa90d..6579d09dd 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1894,7 +1894,7 @@ capmt_caid_change(th_descrambler_t *td) pthread_mutex_unlock(&capmt->capmt_mutex); if (change) - capmt_notify_server(capmt, ct, 0); + capmt_notify_server(capmt, ct, 1); } static void @@ -2111,11 +2111,11 @@ capmt_service_start(caclient_t *cac, service_t *s) i = 0; TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) if (i < MAX_PIDS && SCT_ISAV(st->es_type)) { - if (ct->ct_pids[i] != st->es_pid) change = 1; + if (ct->ct_pids[i] != st->es_pid) change = 3; ct->ct_pids[i++] = st->es_pid; } for ( ; i < MAX_PIDS; i++) { - if (ct->ct_pids[i]) change = 1; + if (ct->ct_pids[i]) change = 3; ct->ct_pids[i] = 0; } goto fin; @@ -2210,7 +2210,7 @@ fin: pthread_mutex_unlock(&capmt->capmt_mutex); if (change) - capmt_notify_server(capmt, NULL, 0); + capmt_notify_server(capmt, NULL, (change >> 1) & 1); }