summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/remux.c b/remux.c
index 9b3b286..e096f9c 100644
--- a/remux.c
+++ b/remux.c
@@ -8,7 +8,7 @@
* the Linux DVB driver's 'tuxplayer' example and were rewritten to suit
* VDR's needs.
*
- * $Id: remux.c 1.19 2004/10/16 09:11:52 kls Exp $
+ * $Id: remux.c 1.21 2004/10/24 09:25:33 kls Exp $
*/
#include "remux.h"
@@ -491,8 +491,8 @@ int cRemux::Put(const uchar *Data, int Count)
break;
if (Data[i] != TS_SYNC_BYTE)
break;
- if (resultBuffer->Free() < IPACKS)
- break;
+ if (resultBuffer->Free() < 2 * IPACKS)
+ break; // A cTS2PES might write one full packet and also a small rest
int pid = GetPid(Data + i + 1);
if (Data[i + 3] & 0x10) { // got payload
if (pid == vPid) vTS2PES->ts_to_pes(Data + i);
@@ -597,7 +597,7 @@ uchar *cRemux::Get(int &Count, uchar *PictureType)
Count += l;
}
else
- resultSkipped = i;
+ resultSkipped = i + l;
if (l > 0)
i += l - 1; // the loop increments, too
}