summaryrefslogtreecommitdiff
path: root/pat.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-12-12 10:31:52 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2020-12-12 10:31:52 +0100
commitdffeabbacb5f36d514a8e3702f73e736c71ad099 (patch)
treea6fcb261b187efc207363c724f9a3674d25dacfb /pat.c
parent9fa7de20368fe2cc517f0c2c43088d051e5f21fb (diff)
downloadvdr-dffeabbacb5f36d514a8e3702f73e736c71ad099.tar.gz
vdr-dffeabbacb5f36d514a8e3702f73e736c71ad099.tar.bz2
Fixed PMT handling in case locking the Channels list times out
Diffstat (limited to 'pat.c')
-rw-r--r--pat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pat.c b/pat.c
index eccec25b..4b320245 100644
--- a/pat.c
+++ b/pat.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.c 4.7 2020/12/09 21:42:26 kls Exp $
+ * $Id: pat.c 4.8 2020/12/12 10:31:52 kls Exp $
*/
#include "pat.h"
@@ -392,9 +392,10 @@ bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNew
se->PidEntry()->SetComplete(PmtPidComplete(PmtPid));
}
if (se->Version() != Version) {
- DBGLOG("PMT %d %2d %5d/%d %2d -> %2d", Transponder(), i, PmtPid, Sid, se->Version(), Version);
if (SetNewVersion)
se->SetVersion(Version);
+ else
+ DBGLOG("PMT %d %2d %5d/%d %2d -> %2d", Transponder(), i, PmtPid, Sid, se->Version(), Version);
return true;
}
break;
@@ -473,7 +474,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(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber(), true)) {
+ if (!PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber(), false)) {
if (activePmt && activePmt->Complete())
SwitchToNextPmtPid();
return;
@@ -482,6 +483,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
cChannels *Channels = cChannels::GetChannelsWrite(StateKey, 10);
if (!Channels)
return;
+ PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber(), true);
bool ChannelsModified = false;
if (activePmt && activePmt->Complete())
SwitchToNextPmtPid();