From 268d89fa4469533bde11ba080f69cf7a18569db3 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 13 May 2016 10:10:27 +0200 Subject: [PATCH] capmt: notify server properly when PID changes after tuning --- src/descrambler/capmt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 8800c6ef9..cd60aa90d 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -2110,10 +2110,14 @@ capmt_service_start(caclient_t *cac, service_t *s) /* update PIDs only */ i = 0; TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) - if (i < MAX_PIDS && SCT_ISAV(st->es_type)) + if (i < MAX_PIDS && SCT_ISAV(st->es_type)) { + if (ct->ct_pids[i] != st->es_pid) change = 1; ct->ct_pids[i++] = st->es_pid; - for ( ; i < MAX_PIDS; i++) + } + for ( ; i < MAX_PIDS; i++) { + if (ct->ct_pids[i]) change = 1; ct->ct_pids[i] = 0; + } goto fin; } -- 2.47.3