mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling broken PMT records
This commit is contained in:
parent
5f7e788ae8
commit
513b24ccd7
@ -780,6 +780,7 @@ Marcel Wiesweg <marcel.wiesweg@gmx.de>
|
|||||||
for fixing a possible crash with inconsistent SI data
|
for fixing a possible crash with inconsistent SI data
|
||||||
for pointing out a problem with the cChannel copy constructor
|
for pointing out a problem with the cChannel copy constructor
|
||||||
for fixing cDvbTuner to avoid lockups on NPTL systems
|
for fixing cDvbTuner to avoid lockups on NPTL systems
|
||||||
|
for pointing out how to detect broken PMT records
|
||||||
|
|
||||||
Torsten Herz <torsten.herz@web.de>
|
Torsten Herz <torsten.herz@web.de>
|
||||||
for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu
|
for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu
|
||||||
|
5
HISTORY
5
HISTORY
@ -4455,3 +4455,8 @@ Video Disk Recorder Revision History
|
|||||||
- Single shot VPS timers are now only considered 'expired' if their associated
|
- Single shot VPS timers are now only considered 'expired' if their associated
|
||||||
EPG event has been explicitly set to SI::RunningStatusNotRunning.
|
EPG event has been explicitly set to SI::RunningStatusNotRunning.
|
||||||
- The check for timers to be deleted is now done only every 30 seconds.
|
- The check for timers to be deleted is now done only every 30 seconds.
|
||||||
|
|
||||||
|
2006-03-31: Version 1.3.46
|
||||||
|
|
||||||
|
- Fixed handling broken PMT records (thanks to Marcel Wiesweg for pointing out how
|
||||||
|
to detect these).
|
||||||
|
6
config.h
6
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.247 2006/02/28 12:23:28 kls Exp $
|
* $Id: config.h 1.248 2006/03/31 12:41:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -19,8 +19,8 @@
|
|||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#define VDRVERSION "1.3.45"
|
#define VDRVERSION "1.3.46"
|
||||||
#define VDRVERSNUM 10345 // Version * 10000 + Major * 100 + Minor
|
#define VDRVERSNUM 10346 // Version * 10000 + Major * 100 + Minor
|
||||||
|
|
||||||
#define MAXPRIORITY 99
|
#define MAXPRIORITY 99
|
||||||
#define MAXLIFETIME 99
|
#define MAXLIFETIME 99
|
||||||
|
7
pat.c
7
pat.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.c 1.15 2006/01/27 15:48:29 kls Exp $
|
* $Id: pat.c 1.16 2006/03/31 12:39:34 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -232,6 +232,7 @@ cPatFilter::cPatFilter(void)
|
|||||||
{
|
{
|
||||||
pmtIndex = 0;
|
pmtIndex = 0;
|
||||||
pmtPid = 0;
|
pmtPid = 0;
|
||||||
|
pmtSid = 0;
|
||||||
lastPmtScan = 0;
|
lastPmtScan = 0;
|
||||||
numPmtEntries = 0;
|
numPmtEntries = 0;
|
||||||
Set(0x00, 0x00); // PAT
|
Set(0x00, 0x00); // PAT
|
||||||
@ -242,6 +243,7 @@ void cPatFilter::SetStatus(bool On)
|
|||||||
cFilter::SetStatus(On);
|
cFilter::SetStatus(On);
|
||||||
pmtIndex = 0;
|
pmtIndex = 0;
|
||||||
pmtPid = 0;
|
pmtPid = 0;
|
||||||
|
pmtSid = 0;
|
||||||
lastPmtScan = 0;
|
lastPmtScan = 0;
|
||||||
numPmtEntries = 0;
|
numPmtEntries = 0;
|
||||||
}
|
}
|
||||||
@ -289,6 +291,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
if (!assoc.isNITPid()) {
|
if (!assoc.isNITPid()) {
|
||||||
if (Index++ >= pmtIndex && Channels.GetByServiceID(Source(), Transponder(), assoc.getServiceId())) {
|
if (Index++ >= pmtIndex && Channels.GetByServiceID(Source(), Transponder(), assoc.getServiceId())) {
|
||||||
pmtPid = assoc.getPid();
|
pmtPid = assoc.getPid();
|
||||||
|
pmtSid = assoc.getServiceId();
|
||||||
Add(pmtPid, 0x02);
|
Add(pmtPid, 0x02);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -303,6 +306,8 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
SI::PMT pmt(Data, false);
|
SI::PMT pmt(Data, false);
|
||||||
if (!pmt.CheckCRCAndParse())
|
if (!pmt.CheckCRCAndParse())
|
||||||
return;
|
return;
|
||||||
|
if (pmt.getServiceId() != pmtSid)
|
||||||
|
return; // skip broken PMT records
|
||||||
if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
|
if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
|
||||||
lastPmtScan = 0; // this triggers the next scan
|
lastPmtScan = 0; // this triggers the next scan
|
||||||
return;
|
return;
|
||||||
|
3
pat.h
3
pat.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.h 1.5 2006/03/26 14:09:43 kls Exp $
|
* $Id: pat.h 1.6 2006/03/29 15:18:38 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PAT_H
|
#ifndef __PAT_H
|
||||||
@ -20,6 +20,7 @@ private:
|
|||||||
time_t lastPmtScan;
|
time_t lastPmtScan;
|
||||||
int pmtIndex;
|
int pmtIndex;
|
||||||
int pmtPid;
|
int pmtPid;
|
||||||
|
int pmtSid;
|
||||||
uint64_t pmtVersion[MAXPMTENTRIES];
|
uint64_t pmtVersion[MAXPMTENTRIES];
|
||||||
int numPmtEntries;
|
int numPmtEntries;
|
||||||
bool PmtVersionChanged(int PmtPid, int Sid, int Version);
|
bool PmtVersionChanged(int PmtPid, int Sid, int Version);
|
||||||
|
Loading…
Reference in New Issue
Block a user