VDR-1.3.28: updated cVideoRepacker
Commit Message
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
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
@@ -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");