From patchwork Sat Aug 20 19:58:10 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Nissl X-Patchwork-Id: 11985 Received: from mail.gmx.de ([213.165.64.20] helo=mail.gmx.net) by www.linuxtv.org with smtp (Exim 4.34) id 1E6ZUI-0001ys-6t for vdr@linuxtv.org; Sat, 20 Aug 2005 21:58:42 +0200 Received: (qmail invoked by alias); 20 Aug 2005 19:58:10 -0000 Received: from Af0c2.a.pppool.de (EHLO [192.168.101.15]) [213.6.240.194] by mail.gmx.net (mp013) with SMTP; 20 Aug 2005 21:58:10 +0200 X-Authenticated: #527675 Message-ID: <43078B52.8080104@gmx.de> Date: Sat, 20 Aug 2005 21:58:10 +0200 From: Reinhard Nissl User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR X-Y-GMX-Trusted: 0 Subject: [vdr] VDR-1.3.28: updated cVideoRepacker X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 19:58:42 -0000 Status: O X-Status: X-Keywords: X-UID: 4329 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. --- ../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");