VDR-1.3.28: updated cVideoRepacker

Message ID 43078B52.8080104@gmx.de
State New
Headers

Commit Message

Reinhard Nissl Aug. 20, 2005, 7:58 p.m. UTC
  Hi,

after a lot of testing with "generated" bad signal quality I've finally 
fixed cVideoRepacker.

Please apply the attached patch which should also fit for VDR-1.3.29.

Bye.
  

Comments

Dominique Simon Aug. 21, 2005, 9:49 a.m. UTC | #1
Am 20.08.2005 um 21:58 schrieb Reinhard Nissl:

> after a lot of testing with "generated" bad signal quality I've  
> finally fixed cVideoRepacker.
>


Thanks! I strongly assume that there will be a new VDR today with  
your fix? If not, i'll try it this evening. Good work! Thanks!

Ciao
  

Patch

--- ../vdr-1.3.28-orig/remux.c	2005-07-30 12:23:00.000000000 +0200
+++ remux.c	2005-08-20 21:42:27.000000000 +0200
@@ -171,11 +171,9 @@  bool cVideoRepacker::PushOutPacket(cRing
      int Bite = fragmentLen + (Count >= 0 ? 0 : Count);
      // put data into result buffer
      int n = Put(ResultBuffer, fragmentData, Bite);
-     if (n != Bite) {
-        Reset();
-        return false;
-        }
      fragmentLen = 0;
+     if (n != Bite)
+        return false;
      }
   else if (pesHeaderLen > 0) { // ... which is contained in the PES header buffer
      int PacketLen = pesHeaderLen + Count - 6;
@@ -186,11 +184,9 @@  bool cVideoRepacker::PushOutPacket(cRing
      int Bite = pesHeaderLen + (Count >= 0 ? 0 : Count);
      // put data into result buffer
      int n = Put(ResultBuffer, pesHeader, Bite);
-     if (n != Bite) {
-        Reset();
-        return false;
-        }
      pesHeaderLen = 0;
+     if (n != Bite)
+        return false;
      }
   // append further payload
   if (Count > 0) {
@@ -198,10 +194,8 @@  bool cVideoRepacker::PushOutPacket(cRing
      int Bite = Count;
      // put data into result buffer
      int n = Put(ResultBuffer, Data, Bite);
-     if (n != Bite) {
-        Reset();
+     if (n != Bite)
         return false;
-        }
      }
   // we did it ;-)
   return true;
@@ -250,12 +244,10 @@  void cVideoRepacker::Repack(cRingBufferL
            switch (*data) {
              case 0xB9 ... 0xFF: // system start codes
                   esyslog("cVideoRepacker: found system start code: stream seems to be scrambled or not demultiplexed");
-                  Reset();
                   break;
              case 0xB0 ... 0xB1: // reserved start codes
              case 0xB6:
                   esyslog("cVideoRepacker: found reserved start code: stream seems to be scrambled");
-                  Reset();
                   break;
              case 0xB4: // sequence error code
                   isyslog("cVideoRepacker: found sequence error code: stream seems to be damaged");