Bug in pat.c (VDR 1.7.27) - possible fix attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I located a small bug which has been introduced in 1.7.18 (at least I think 
so). Reading the Changes file I could not determine which change caused it, 
but the problem is the following. 

In pat.c: if the PMT of a service has a stream of stream-type  128 (0x80) 
the vpid is overridden with the PID signalled in the Elementary-PID-field of 
this stream. This happens to be the case here in France for some of the DVB-
T services. It breaks 2 channels (France 2 and France 5) when channel-
updates is at least configured to "update PIDs".

The code which is doing that is described as "STREAMTYPE_USER_PRIVATE - 
DigiCipher II VIDEO (ANSI/SCTE 57)" which before was only applied when the 
stream had a certain descriptor and there a certain type. 

The attached patch resets the code to do exactly that for STREAMTYPE 0x80 - 
though can't check whether the digiCipher-stuff is still working. 

Please consider applying soon.

Thanks,
--
Patrick

http://www.kernellabs.com/
diff --git a/pat.c b/pat.c
index d9b93f6..f0d0024 100644
--- a/pat.c
+++ b/pat.c
@@ -456,12 +456,30 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
                          }
                       }
                       break;
-              case 0x80: // STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
-                      Vpid = esPid;
-                      Ppid = pmt.getPCRPid();
-                      Vtype = 0x02; // compression based upon MPEG-2
-                      ProcessCaDescriptors = true;
-                      break;
+              case 0x80: {
+                  SI::Descriptor *d;
+                  for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
+                      switch (d->getDescriptorTag()) {
+                      case SI::RegistrationDescriptorTag: {
+                          SI::RegistrationDescriptor *rd = (SI::RegistrationDescriptor *)d;
+                          // http://www.smpte-ra.org/mpegreg/mpegreg.html
+                          switch (rd->getFormatIdentifier()) {
+                          case 0x44434949: // STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
+                              Vpid = esPid;
+                              Ppid = pmt.getPCRPid();
+                              Vtype = 0x02; // compression based upon MPEG-2
+                              ProcessCaDescriptors = true;
+                              break;
+                          default:
+                              break;
+                          }
+                      } break;
+                      default:
+                          break;
+                      }
+                  }
+              } break;
+
               case 0x81: // STREAMTYPE_USER_PRIVATE - ATSC A/53 AUDIO (ANSI/SCTE 57)
                       {
                       char lang[MAXLANGCODE1] = { 0 };
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux