summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-05-18 12:55:16 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-05-18 12:55:16 +0200
commit98ac611779094e70da829639488ac8c589e9ed87 (patch)
treef503146e128c4c7220ba11bcef08011db71149c3
parent435ee3981203577709ffd41057f0e120615871a1 (diff)
downloadvdr-98ac611779094e70da829639488ac8c589e9ed87.tar.gz
vdr-98ac611779094e70da829639488ac8c589e9ed87.tar.bz2
Avoiding spurious section filter settings after a channel switch
-rw-r--r--HISTORY1
-rw-r--r--eit.c10
-rw-r--r--eit.h3
3 files changed, 12 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index d5979040..ec1d0994 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2164,3 +2164,4 @@ Video Disk Recorder Revision History
that are currently not transmitting (thanks to Marcel Wiesweg for reporting
this one).
- Fixed setting the locking pid after a timed wait (thanks to Andreas Schultz).
+- Avoiding spurious section filter settings after a channel switch.
diff --git a/eit.c b/eit.c
index 76da2669..22fcf8aa 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.75 2003/05/11 11:25:04 kls Exp $
+ * $Id: eit.c 1.76 2003/05/18 12:51:50 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1073,6 +1073,7 @@ cSIProcessor::cSIProcessor(const char *FileName)
masterSIProcessor = numSIProcessors == 0; // the first one becomes the 'master'
currentSource = 0;
currentTransponder = 0;
+ statusCount = 0;
pmtIndex = 0;
pmtPid = 0;
filters = NULL;
@@ -1150,6 +1151,7 @@ const char *cSIProcessor::GetEpgDataFileName(void)
void cSIProcessor::SetStatus(bool On)
{
LOCK_THREAD;
+ statusCount++;
ShutDownFilters();
pmtIndex = 0;
pmtPid = 0;
@@ -1176,6 +1178,7 @@ void cSIProcessor::Action()
time_t lastCleanup = time(NULL);
time_t lastPmtScan = time(NULL);
+ int oldStatusCount = 0;
active = true;
while(active)
@@ -1208,6 +1211,7 @@ void cSIProcessor::Action()
}
// set up pfd structures for all active filter
+ Lock();
pollfd pfd[MAX_FILTERS];
int NumUsedFilters = 0;
for (int a = 0; a < MAX_FILTERS ; a++)
@@ -1219,6 +1223,8 @@ void cSIProcessor::Action()
NumUsedFilters++;
}
}
+ oldStatusCount = statusCount;
+ Unlock();
// wait until data becomes ready from the bitfilter
if (poll(pfd, NumUsedFilters, 1000) != 0)
@@ -1239,6 +1245,8 @@ void cSIProcessor::Action()
//dsyslog("Received pid 0x%04X with table ID 0x%02X and length of %4d\n", pid, buf[0], seclen);
cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex
LOCK_THREAD;
+ if (statusCount != oldStatusCount)
+ break;
switch (pid)
{
case 0x00:
diff --git a/eit.h b/eit.h
index 37733340..076e4f87 100644
--- a/eit.h
+++ b/eit.h
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.h 1.28 2003/04/21 13:22:06 kls Exp $
+ * $Id: eit.h 1.29 2003/05/18 12:51:50 kls Exp $
***************************************************************************/
#ifndef __EIT_H
@@ -148,6 +148,7 @@ private:
bool masterSIProcessor;
int currentSource;
int currentTransponder;
+ int statusCount;
int pmtIndex;
int pmtPid;
SIP_FILTER *filters;