diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-13 10:35:38 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-13 10:35:38 +0100 |
commit | 4f6f05161e787bc05c38d5551cd2b47424f600cc (patch) | |
tree | db5d716561680b66558de191de17797766eace37 /pat.c | |
parent | 9c1f56ec71a68e945ff7315ae710f6f9f03e8cc8 (diff) | |
download | vdr-4f6f05161e787bc05c38d5551cd2b47424f600cc.tar.gz vdr-4f6f05161e787bc05c38d5551cd2b47424f600cc.tar.bz2 |
Taking the Sid into account when detecting version changes in processing the PMT
Diffstat (limited to 'pat.c')
-rw-r--r-- | pat.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: pat.c 1.7 2004/01/25 15:12:53 kls Exp $ + * $Id: pat.c 1.8 2004/03/07 16:59:00 kls Exp $ */ #include "pat.h" @@ -250,19 +250,21 @@ void cPatFilter::Trigger(void) numPmtEntries = 0; } -bool cPatFilter::PmtVersionChanged(int PmtPid, int Version) +bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version) { - Version <<= 16; + uint64_t v = Version; + v <<= 32; + uint64_t id = (PmtPid | (Sid << 16)) & 0x00000000FFFFFFFFLL; for (int i = 0; i < numPmtEntries; i++) { - if ((pmtVersion[i] & 0x0000FFFF) == PmtPid) { - bool Changed = (pmtVersion[i] & 0x00FF0000) != Version; + if ((pmtVersion[i] & 0x00000000FFFFFFFFLL) == id) { + bool Changed = (pmtVersion[i] & 0x000000FF00000000LL) != v; if (Changed) - pmtVersion[i] = PmtPid | Version; + pmtVersion[i] = id | v; return Changed; } } if (numPmtEntries < MAXPMTENTRIES) - pmtVersion[numPmtEntries++] = PmtPid | Version; + pmtVersion[numPmtEntries++] = id | v; return true; } @@ -301,7 +303,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length SI::PMT pmt(Data, false); if (!pmt.CheckCRCAndParse()) return; - if (!PmtVersionChanged(pmtPid, pmt.getVersionNumber())) { + if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) { lastPmtScan = 0; // this triggers the next scan return; } |