]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
capmt: notify server properly when PID changes after tuning
authorJaroslav Kysela <perex@perex.cz>
Fri, 13 May 2016 08:10:27 +0000 (10:10 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 May 2016 08:10:27 +0000 (10:10 +0200)
src/descrambler/capmt.c

index 8800c6ef977fc50fe04e1c4d18287b214152d452..cd60aa90dd516154eb856bc84fc6cf35c6719917 100644 (file)
@@ -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;
     }