From b9a8abbe93f1cc404dc415785bf7a2743111bbab Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 6 Aug 2003 14:52:50 +0200 Subject: Fixed the TS to PES repacker so that it works with MPEG1 streams --- remux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'remux.c') diff --git a/remux.c b/remux.c index c2ded246..6dc37e1b 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.15 2003/04/26 15:07:41 kls Exp $ + * $Id: remux.c 1.16 2003/08/06 14:44:03 kls Exp $ */ /* The calling interface of the 'cRemux::Process()' function is defined @@ -321,7 +321,6 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count) if ((flag1 & 0xC0) == 0x80 ) mpeg = 2; else { - esyslog("ERROR: error in data stream!"); hlength = 0; which = 0; mpeg = 1; @@ -361,6 +360,9 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count) write_ipack(&hlength, 1); } + if (mpeg == 1 && found == 7) + write_ipack(&flag1, 1); + if (mpeg == 2 && (flag2 & PTS_ONLY) && found < 14) { while (c < Count && found < 14) { write_ipack(Buf + c, 1); -- cgit v1.2.3