From: Jaroslav Kysela Date: Sun, 8 Nov 2015 15:48:21 +0000 (+0100) Subject: capmt: clean all pids when adapter is NULL X-Git-Tag: v4.2.1~1625 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81dc8c87bd92a937264e7253689170fbbbeda7ff;p=thirdparty%2Ftvheadend.git capmt: clean all pids when adapter is NULL --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 7282ec085..459e7f2f7 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -423,8 +423,15 @@ capmt_pid_flush_adapter(capmt_t *capmt, int adapter) int pid, i; tuner = capmt->capmt_adapters[adapter].ca_tuner; - if (tuner == NULL) + if (tuner == NULL) { + /* clean all pids (to be sure) */ + for (i = 0; i < MAX_PIDS; i++) { + o = &ca->ca_pids[i]; + o->pid = 0; + o->pid_refs = 0; + } return; + } ca = &capmt->capmt_adapters[adapter]; mmi = LIST_FIRST(&tuner->mi_mux_active); mux = mmi ? mmi->mmi_mux : NULL;