summaryrefslogtreecommitdiff
path: root/pat.c
diff options
context:
space:
mode:
Diffstat (limited to 'pat.c')
-rw-r--r--pat.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/pat.c b/pat.c
index cc96cd9..9b3ded6 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 2.4 2009/08/16 15:01:03 kls Exp $
+ * $Id: pat.c 2.7 2010/01/01 15:40:05 kls Exp $
*/
#include "pat.h"
@@ -144,7 +144,7 @@ void cCaDescriptors::AddCaDescriptor(SI::CaDescriptor *d, int EsPid)
q += sprintf(q, "CAM: %04X %5d %5d %04X %04X -", source, transponder, serviceId, d->getCaType(), EsPid);
for (int i = 0; i < nca->Length(); i++)
q += sprintf(q, " %02X", nca->Data()[i]);
- dsyslog(buffer);
+ dsyslog("%s", buffer);
#endif
}
@@ -345,6 +345,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
int NumDpids = 0;
int NumSpids = 0;
for (SI::Loop::Iterator it; pmt.streamLoop.getNext(stream, it); ) {
+ bool ProcessCaDescriptors = false;
int esPid = stream.getPid();
switch (stream.getStreamType()) {
case 1: // STREAMTYPE_11172_VIDEO
@@ -353,6 +354,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
Vpid = esPid;
Ppid = pmt.getPCRPid();
Vtype = stream.getStreamType();
+ ProcessCaDescriptors = true;
break;
case 3: // STREAMTYPE_11172_AUDIO
case 4: // STREAMTYPE_13818_AUDIO
@@ -385,6 +387,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
NumApids++;
}
+ ProcessCaDescriptors = true;
}
break;
case 5: // STREAMTYPE_13818_PRIVATE
@@ -398,6 +401,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
switch (d->getDescriptorTag()) {
case SI::AC3DescriptorTag:
dpid = esPid;
+ ProcessCaDescriptors = true;
break;
case SI::SubtitlingDescriptorTag:
if (NumSpids < MAXSPIDS) {
@@ -443,12 +447,14 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
}
break;
- //default: printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());//XXX
+ default: ;//printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());
}
- for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)stream.streamDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
- CaDescriptors->AddCaDescriptor(d, esPid);
- delete d;
- }
+ if (ProcessCaDescriptors) {
+ for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)stream.streamDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
+ CaDescriptors->AddCaDescriptor(d, esPid);
+ delete d;
+ }
+ }
}
if (Setup.UpdateChannels >= 2) {
Channel->SetPids(Vpid, Ppid, Vtype, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);