summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-11 11:00:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-11 11:00:00 +0200
commite785f39acb91f1a6ccd02765eb66e19c6e2b911c (patch)
tree1fea4f0d9003b787b7531b716e51720a921c8d14 /remux.c
parent1c9d172bc985d8d2a7d2cf86aa59461ff9bc225a (diff)
downloadvdr-e785f39acb91f1a6ccd02765eb66e19c6e2b911c.tar.gz
vdr-e785f39acb91f1a6ccd02765eb66e19c6e2b911c.tar.bz2
More cRepacker fixes
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/remux.c b/remux.c
index 39257a73..c6130892 100644
--- a/remux.c
+++ b/remux.c
@@ -11,7 +11,7 @@
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
*
- * $Id: remux.c 1.46 2005/09/04 15:15:14 kls Exp $
+ * $Id: remux.c 1.47 2005/09/11 11:00:00 kls Exp $
*/
#include "remux.h"
@@ -161,8 +161,10 @@ bool cCommonRepacker::PushOutPacket(cRingBufferLinear *ResultBuffer, const uchar
int PesPayloadOffset = 0;
if (AnalyzePesHeader(fragmentData, fragmentLen, PesPayloadOffset) <= phInvalid)
esyslog("cCommonRepacker: invalid PES packet encountered in fragment buffer!");
- else if (6 + PacketLen <= PesPayloadOffset)
+ else if (6 + PacketLen <= PesPayloadOffset) {
+ fragmentLen = 0;
return true; // skip empty packet
+ }
// amount of data to put into result buffer: a negative Count value means
// to strip off any partially contained start code.
int Bite = fragmentLen + (Count >= 0 ? 0 : Count);
@@ -180,8 +182,10 @@ bool cCommonRepacker::PushOutPacket(cRingBufferLinear *ResultBuffer, const uchar
int PesPayloadOffset = 0;
if (AnalyzePesHeader(pesHeader, pesHeaderLen, PesPayloadOffset) <= phInvalid)
esyslog("cCommonRepacker: invalid PES packet encountered in header buffer!");
- else if (6 + PacketLen <= PesPayloadOffset)
+ else if (6 + PacketLen <= PesPayloadOffset) {
+ pesHeaderLen = 0;
return true; // skip empty packet
+ }
// amount of data to put into result buffer: a negative Count value means
// to strip off any partially contained start code.
int Bite = pesHeaderLen + (Count >= 0 ? 0 : Count);