Ladies and gentlemen,

here's patch #8. It moves the stuffing bytes from the pack headers to
the PES headers. A short test proved that vamps (version 0.99.2) can
process at least the file I used (a 30s snippet from ProSieben, recorded
today). Your mileage may of course vary.

I also uploaded patch #0 from Sven to http://www.mr511.de/dvbcut, so
there is now a complete set of all existing patches to dvbcut 0.5.3.

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little
Index: dvbcut/src/mpegmuxer.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/mpegmuxer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dvbcut/src/mpegmuxer.cpp    5 Jul 2006 21:07:45 -0000       1.2
+++ dvbcut/src/mpegmuxer.cpp    25 Aug 2006 18:07:49 -0000      1.3
@@ -478,6 +478,16 @@
     //       }
 
 
+    int pes_padding = 0;
+    if (packsize) {
+      int maxpayload = pack::maxpayload(packsize);
+      assert(len <= maxpayload);
+      if (maxpayload - len < 8)
+        pes_padding = maxpayload - len;
+      headerlen += pes_padding;
+      len += pes_padding;
+      }
+
     pack * const p=new pack(packsize,len,muxrate,a->getdts());
     s->packlist.push_back(p);
     ++s->packet;
@@ -547,6 +557,14 @@
         headerext=false;
         headerlen-=3;
         }
+      if (pes_padding > 0) {
+        memset(data, 0xff, pes_padding);
+        data += pes_padding;
+        headerlen -= pes_padding;
+        plen -= pes_padding;
+        len -= pes_padding;
+        pes_padding = 0;
+        }
       if (isprivatestream) {
         *(data++)=s->id & 0xff;
         --plen;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to