From b9a8abbe93f1cc404dc415785bf7a2743111bbab Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 6 Aug 2003 14:52:50 +0200 Subject: [PATCH] Fixed the TS to PES repacker so that it works with MPEG1 streams --- CONTRIBUTORS | 1 + HISTORY | 5 +++++ config.h | 6 +++--- remux.c | 6 ++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 6b199f25..80386477 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -550,6 +550,7 @@ R Andreas Kool for his help in keeping 'channels.conf.cable' up to date + for fixing the TS to PES repacker so that it works with MPEG1 streams Guy Roussin for suggesting not to display channel group delimiters without text diff --git a/HISTORY b/HISTORY index 52a30059..3181d090 100644 --- a/HISTORY +++ b/HISTORY @@ -2282,3 +2282,8 @@ Video Disk Recorder Revision History - Now the program uses the values of VIDEODIR and PLUGINDIR defined in Makefile or Makefile.config as defaults (thanks to Steffen Barszus). - Added the usual menu timeout to the CAM menus. + +2003-08-06: Version 1.2.3 + +- Fixed the TS to PES repacker so that it works with MPEG1 streams (thanks to + Andreas Kool). diff --git a/config.h b/config.h index 40aead20..9e6f6e2e 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.165 2003/06/12 20:37:14 kls Exp $ + * $Id: config.h 1.166 2003/08/06 14:45:10 kls Exp $ */ #ifndef __CONFIG_H @@ -19,8 +19,8 @@ #include "device.h" #include "tools.h" -#define VDRVERSION "1.2.2" -#define VDRVERSNUM 10202 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.2.3" +#define VDRVERSNUM 10203 // Version * 10000 + Major * 100 + Minor #define MAXPRIORITY 99 #define MAXLIFETIME 99 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);