From ba81d3ba90e6ab19048c36148f10c0fb8b2e8dbe Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 7 Jan 2013 17:34:18 +0400 Subject: [PATCH] zapit/src/capmt.cpp: fix to use all 4 demuxes --- src/zapit/include/zapit/capmt.h | 2 +- src/zapit/src/capmt.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zapit/include/zapit/capmt.h b/src/zapit/include/zapit/capmt.h index 674429940..060c64b48 100644 --- a/src/zapit/include/zapit/capmt.h +++ b/src/zapit/include/zapit/capmt.h @@ -47,7 +47,7 @@ class CCam : public CBasicClient private: virtual unsigned char getVersion(void) const; virtual const char *getSocketName(void) const; - int camask, demuxes[3]; + int camask, demuxes[4]; int source_demux; uint8_t cabuf[2048]; int calen; diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index 1514cd184..6036ca336 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -37,7 +37,7 @@ CCam::CCam() { camask = 0; - demuxes[0] = demuxes[1] = demuxes[2] = 0; + demuxes[0] = demuxes[1] = demuxes[2] = demuxes[3] = 0; source_demux = -1; calen = 0; } @@ -147,11 +147,11 @@ int CCam::makeMask(int demux, bool add) else if(demuxes[demux] > 0) demuxes[demux]--; - for(int i = 0; i < 3; i++) { + for(int i = 0; i < 4; i++) { if(demuxes[i] > 0) mask |= 1 << i; } - DBG("demuxes %d:%d:%d old mask %d new mask %d", demuxes[0], demuxes[1], demuxes[2], camask, mask); + DBG("demuxes %d:%d:%d:%d old mask %d new mask %d", demuxes[0], demuxes[1], demuxes[2], demuxes[3], camask, mask); return mask; }