summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-06-21 20:13:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-06-21 20:13:55 +0200
commit8c7d387e8650d82883685602708fe05c6b655a8b (patch)
tree583a9b69303a650d4a8f5e005f6f582298c1dcca
parent6c5a448dec029f4d72629662cb2d1869dfec3f35 (diff)
downloadvdr-8c7d387e8650d82883685602708fe05c6b655a8b.tar.gz
vdr-8c7d387e8650d82883685602708fe05c6b655a8b.tar.bz2
Fixed triggering the PAT filter
-rw-r--r--HISTORY1
-rw-r--r--pat.c13
-rw-r--r--pat.h4
-rw-r--r--sdt.c9
4 files changed, 12 insertions, 15 deletions
diff --git a/HISTORY b/HISTORY
index b20b400f..c014a35c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9733,3 +9733,4 @@ Video Disk Recorder Revision History
compared case insensitive.
- Improved responsiveness in cSectionHandler::Action() (thanks to Helmut Binder).
- Fixed deleting the edited recording in case of an error (reported by Christoph Haubrich).
+- Fixed triggering the PAT filter.
diff --git a/pat.c b/pat.c
index f58edf55..acda0f55 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 5.3 2021/06/11 09:38:38 kls Exp $
+ * $Id: pat.c 5.4 2021/06/21 20:13:55 kls Exp $
*/
#include "pat.h"
@@ -401,15 +401,8 @@ void cPatFilter::Trigger(int)
{
cMutexLock MutexLock(&mutex);
DBGLOG("PAT filter trigger");
- if (activePmt != pmtPidList.First()) {
- if (activePmt && activePmt->Count() == 0)
- activePmt->SetState(-1);
- activePmt = pmtPidList.First();
- if (activePmt && activePmt->Count() == 0) {
- activePmt->SetState(1);
- timer.Set(PMT_SCAN_TIMEOUT);
- }
- }
+ patVersion = -1;
+ sectionSyncer.Reset();
}
void cPatFilter::Request(int Sid)
diff --git a/pat.h b/pat.h
index 86999a53..8b55ec9b 100644
--- a/pat.h
+++ b/pat.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.h 5.2 2021/06/11 09:38:38 kls Exp $
+ * $Id: pat.h 5.3 2021/06/21 20:13:55 kls Exp $
*/
#ifndef __PAT_H
@@ -41,7 +41,7 @@ protected:
public:
cPatFilter(void);
virtual void SetStatus(bool On);
- void Trigger(int); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored)
+ void Trigger(int = 0); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored)
void Request(int Sid); // requests permanent reading of the PMT PID for this SID
void Release(int Sid); // releases permanent reading of the PMT PID for this SID
};
diff --git a/sdt.c b/sdt.c
index 7634761e..d1e4c151 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 5.1 2021/03/16 15:10:54 kls Exp $
+ * $Id: sdt.c 5.2 2021/06/21 20:13:55 kls Exp $
*/
#include "sdt.h"
@@ -90,6 +90,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
return;
dbgsdt("SDT: %2d %2d %2d %s %d\n", sdt.getVersionNumber(), sdt.getSectionNumber(), sdt.getLastSectionNumber(), *cSource::ToString(source), Transponder());
bool ChannelsModified = false;
+ bool TriggerPat = false;
SI::SDT::Service SiSdtService;
for (SI::Loop::Iterator it; sdt.serviceLoop.getNext(SiSdtService, it); ) {
cChannel *Channel = Channels->GetByChannelID(tChannelID(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
@@ -152,7 +153,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
Channel = Channels->NewChannel(this->Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
Channel->SetSource(source); // in case this comes from a satellite with a slightly different position
ChannelsModified = true;
- patFilter->Trigger(SiSdtService.getServiceId());
+ TriggerPat = true;
}
}
default: ;
@@ -178,8 +179,8 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
cChannel *link = Channels->GetByChannelID(tChannelID(source, Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
if (!link && Setup.UpdateChannels >= 4) {
link = Channels->NewChannel(this->Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
- patFilter->Trigger(Service.getServiceId());
ChannelsModified = true;
+ TriggerPat = true;
}
if (link) {
if (!LinkChannels)
@@ -201,6 +202,8 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
delete LinkChannels;
}
}
+ if (TriggerPat)
+ patFilter->Trigger();
if (sectionSyncer.Processed(sdt.getSectionNumber(), sdt.getLastSectionNumber())) {
if (Setup.UpdateChannels == 1 || Setup.UpdateChannels >= 3) {
ChannelsModified |= Channels->MarkObsoleteChannels(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId());