summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-11-19 10:32:31 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-11-19 10:32:31 +0100
commit8f9136ecab28d915d3e57f35badf4b74bb2bfce8 (patch)
tree9fc527d18b580cb3bb22b4decfed2690991229a7 /remux.c
parent56f8752b9a08b43ffd0a8e7e4bb2b0d13fc6d28f (diff)
downloadvdr-8f9136ecab28d915d3e57f35badf4b74bb2bfce8.tar.gz
vdr-8f9136ecab28d915d3e57f35badf4b74bb2bfce8.tar.bz2
In order to be able to play TS recordings from other sources, in which there is more than one PMT PID in the PAT, 'int cPatPmtParser::PatPmt(void)' has been changed to 'bool cPatPmtParser::IsPatPmt(int Pid)'
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/remux.c b/remux.c
index e3b34c66..02fd1c12 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.71 2012/11/18 12:18:08 kls Exp $
+ * $Id: remux.c 2.72 2012/11/19 10:23:42 kls Exp $
*/
#include "remux.h"
@@ -574,7 +574,7 @@ void cPatPmtParser::Reset(void)
{
pmtSize = 0;
patVersion = pmtVersion = -1;
- pmtPid = -1;
+ pmtPids[0] = 0;
vpid = vtype = 0;
ppid = 0;
}
@@ -594,14 +594,17 @@ void cPatPmtParser::ParsePat(const uchar *Data, int Length)
dbgpatpmt("PAT: TSid = %d, c/n = %d, v = %d, s = %d, ls = %d\n", Pat.getTransportStreamId(), Pat.getCurrentNextIndicator(), Pat.getVersionNumber(), Pat.getSectionNumber(), Pat.getLastSectionNumber());
if (patVersion == Pat.getVersionNumber())
return;
+ int NumPmtPids = 0;
SI::PAT::Association assoc;
for (SI::Loop::Iterator it; Pat.associationLoop.getNext(assoc, it); ) {
dbgpatpmt(" isNITPid = %d\n", assoc.isNITPid());
if (!assoc.isNITPid()) {
- pmtPid = assoc.getPid();
+ if (NumPmtPids <= MAX_PMT_PIDS)
+ pmtPids[NumPmtPids++] = assoc.getPid();
dbgpatpmt(" service id = %d, pid = %d\n", assoc.getServiceId(), assoc.getPid());
}
}
+ pmtPids[NumPmtPids] = 0;
patVersion = Pat.getVersionNumber();
}
else
@@ -839,7 +842,7 @@ bool cPatPmtParser::ParsePatPmt(const uchar *Data, int Length)
int Pid = TsPid(Data);
if (Pid == PATPID)
ParsePat(Data, TS_SIZE);
- else if (Pid == PmtPid()) {
+ else if (IsPmtPid(Pid)) {
ParsePmt(Data, TS_SIZE);
if (patVersion >= 0 && pmtVersion >= 0)
return true;