diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/misc/cmdline.c dvbsnoop-1.4.50mk/src/misc/cmdline.c
--- dvbsnoop-1.4.50/src/misc/cmdline.c	2006-03-06 02:04:54.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/misc/cmdline.c	2009-01-08 17:38:50.000000000 +0100
@@ -265,6 +265,7 @@
   opt->soft_crc = 0;
   opt->spider_pid = 0;
   opt->ts_subdecode = 0;
+  opt->ts_comagPVR2_100CI = 0;
   opt->rd_all_sections = 0;	// read all section no. for a pid 
   opt->ts_raw_mode = 0;
   opt->rd_packet_count = 0;
@@ -323,6 +324,7 @@
      else if (!strcmp (argv[i],"-help")) opt->help = 1;
      else if (!strcmp (argv[i],"-privateprovider")) opt->privateProviderStr = argv[++i];
      else if (!strcmp (argv[i],"-tssubdecode")) opt->ts_subdecode = 1;
+     else if (!strcmp (argv[i],"-tscomagPVR2_100CI")) opt->ts_comagPVR2_100CI = 1;
      else if (!strcmp (argv[i],"-allsections")) opt->rd_all_sections = 1;
      else if (!strcmp (argv[i],"-dsmccsave")) opt->dsmcc_save = 1;
      else if (!strcmp (argv[i],"-f")) {
@@ -537,6 +539,7 @@
 // $$$ TODO
 //    printf("   -allsections: read all sections in sequence on pid (limited by -n ..) \n");
     printf("   -tssubdecode: sub-decode sections or pes from ts stream decoding\n");
+    printf("   -tscomagPVR2_100CI: sub-decode Null packet for Comag PVR2/100CI\n");
     printf("   -tsraw:       read raw/full TS in TS snoop mode\n");
     printf("   -b:           binary output of packets (disables other output)\n");
     printf("   -ph mode:     data hex dump mode, modes: [-ph 4]\n");
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/misc/cmdline.h dvbsnoop-1.4.50mk/src/misc/cmdline.h
--- dvbsnoop-1.4.50/src/misc/cmdline.h	2006-03-06 02:04:54.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/misc/cmdline.h	2009-01-08 17:36:19.000000000 +0100
@@ -58,6 +58,7 @@
   int         rd_all_sections;		// read all sections no. for a pid
   int         spider_pid;		// Section PID spider mode
   int         ts_subdecode;		// sub decode PES or SEC in TS stream
+  int         ts_comagPVR2_100CI;       // sub decode null packet for Comag PVR2 100 CI
   int         ts_raw_mode;		// Read full TS in TS stream mode (if hardware supported)
   int         time_mode;		// time print mode
   char        *privateProviderStr;	// Private Provider ID str (usedef tables, descr)
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/Makefile.in dvbsnoop-1.4.50mk/src/ts/Makefile.in
--- dvbsnoop-1.4.50/src/ts/Makefile.in	2007-06-02 16:53:29.000000000 +0200
+++ dvbsnoop-1.4.50mk/src/ts/Makefile.in	2009-01-08 17:45:51.000000000 +0100
@@ -52,6 +52,7 @@
 libts_a_AR = $(AR) $(ARFLAGS)
 libts_a_LIBADD =
 am_libts_a_OBJECTS = tslayer.$(OBJEXT) ts2secpes.$(OBJEXT) \
+	ts_comag.$(OBJEXT) \
 	ts_cc_check.$(OBJEXT) ts_mip.$(OBJEXT) ts_misc.$(OBJEXT)
 libts_a_OBJECTS = $(am_libts_a_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir)
@@ -59,7 +60,8 @@
 am__depfiles_maybe = depfiles
 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ts2secpes.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/ts_cc_check.Po ./$(DEPDIR)/ts_mip.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/ts_misc.Po ./$(DEPDIR)/tslayer.Po
+@AMDEP_TRUE@	./$(DEPDIR)/ts_misc.Po ./$(DEPDIR)/tslayer.Po \
+@AMDEP_TRUE@    ./$(DEPDIR)/ts_comag.Po
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
@@ -145,6 +147,7 @@
 noinst_LIBRARIES = libts.a
 noinst_HEADERS = \
 	tslayer.h \
+	ts_comag.h \
 	ts2secpes.h \
 	ts_cc_check.h \
 	ts_mip.h \
@@ -152,6 +155,7 @@
 
 libts_a_SOURCES = \
 	tslayer.c \
+	ts_comag.c \
 	ts2secpes.c \
 	ts_cc_check.c \
 	ts_mip.c \
@@ -204,6 +208,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_comag.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts2secpes.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_cc_check.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_mip.Po@am__quote@
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/ts2secpes.c dvbsnoop-1.4.50mk/src/ts/ts2secpes.c
--- dvbsnoop-1.4.50/src/ts/ts2secpes.c	2006-02-13 01:17:13.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/ts/ts2secpes.c	2009-01-08 18:00:42.000000000 +0100
@@ -85,7 +85,7 @@
 #include "pes/pespacket.h"
 #include "misc/packet_mem.h"
 #include "misc/output.h"
-
+#include "ts_comag.h"
 
 
 
@@ -241,7 +241,7 @@
 // -- check TS buffer and push data to sub decoding buffer
 // -- on new packet start, output old packet data
 //
-void ts2SecPes_subdecode (u_char *b, int len, u_int opt_pid)
+void ts2SecPes_subdecode (u_char *b, int len, u_int opt_pid, u_int opt_comagPVR2_100CI)
 {
     u_int  transport_error_indicator;		
     u_int  payload_unit_start_indicator;		
@@ -259,6 +259,12 @@
 	 if (opt_pid != pid)  return;
  }
 
+ // -- special subdecode if wanted
+ if ( ( pid == 0x1fff ) && opt_comagPVR2_100CI ) {
+     comag_PVR2_100_CI_subdecode(b+4,len-4);
+ }
+   
+   
  // -- no ts subdecode for special pids...
  if (check_TS_PID_special (pid)) return;
 
@@ -348,6 +354,8 @@
 int  ts2SecPes_checkAndDo_PacketSubdecode_Output (void)
 {
 
+    comag_PVR2_100_CI_checkAndDo_subdecode_Output();
+
 	// -- already read all data? decode & output data...
 	if ( (tsd.payload_length) && (tsd.payload_length <= packetMem_length(tsd.mem_handle)) ) {
      		if (tsd.status != TSD_output_done) {
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/ts2secpes.h dvbsnoop-1.4.50mk/src/ts/ts2secpes.h
--- dvbsnoop-1.4.50/src/ts/ts2secpes.h	2006-01-02 20:24:34.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/ts/ts2secpes.h	2009-01-08 17:36:19.000000000 +0100
@@ -23,7 +23,7 @@
 int  ts2SecPes_AddPacketStart (int pid, int cc, u_char *b, u_int len);
 int  ts2SecPes_AddPacketContinue (int pid, int cc, u_char *b, u_int len);
 
-void ts2SecPes_subdecode (u_char *b, int len, u_int pid);
+void ts2SecPes_subdecode (u_char *b, int len, u_int pid, u_int opt_comagPVR2_100CI);
 int  ts2SecPes_checkAndDo_PacketSubdecode_Output (void);
 int  ts2SecPes_LastPacketReadSubdecode_Output (void);
 void ts2SecPes_Output_subdecode (u_int overleap_bytes);
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/ts_comag.c dvbsnoop-1.4.50mk/src/ts/ts_comag.c
--- dvbsnoop-1.4.50/src/ts/ts_comag.c	1970-01-01 01:00:00.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/ts/ts_comag.c	2009-01-08 20:02:03.000000000 +0100
@@ -0,0 +1,128 @@
+/*
+$Id:$
+
+
+ DVBSNOOP
+
+ a dvb sniffer  and mpeg2 stream analyzer tool
+ http://dvbsnoop.sourceforge.net/
+
+ (c) 2009   Markus Kohm at gmx DOT de
+
+
+
+ -- Transport Stream Sub-Decode  for Comag PVR2/100CI
+
+   
+
+
+$Log:$
+*/
+
+
+
+
+#include "dvbsnoop.h"
+#include "misc/output.h"
+#include "ts_comag.h"
+
+u_char buffer[184];
+int bufpos = 0;
+
+int comag_PVR2_100_CI_subdecode(u_char *b,int len) {
+    if ( ( len < 184 ) ||
+	 ( b[0] != 0x02 ) || ( b[1] != 0x32 ) ||
+	 ( b[2] != 0x23 ) || ( b[3] != 0x10 ) || ( b[4] != 0x01 ) )
+	return bufpos;
+    
+    if ( bufpos + len > 184 ) {
+	len = 184 - bufpos;
+    }
+    memcpy(buffer+bufpos,b,len);
+    bufpos += len;
+    out_nl(3,"New bufpos=%d",bufpos);
+    return bufpos;
+}
+
+int comag_PVR2_100_CI_checkAndDo_subdecode_Output() {
+    u_long u;
+    u_long n;
+    u_int pid;
+    
+    if ( bufpos == 184 ) {
+	indent (+1);
+	out_nl(3,"TS sub-decoding (Comag PVR2/100CI packet)" );
+	indent (+1);
+	out_nl(3,"Magic: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x", 
+	       buffer[0], buffer[1], buffer[2], buffer[3], buffer[4] );
+	out_nl(3,"7 Reserved: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[5], buffer[6], buffer[7], buffer[8], buffer[9],
+	       buffer[10], buffer[11] );
+	u=buffer[12]+256*(buffer[13]+256*(buffer[14]+256*buffer[15]));
+	out_nl(3,"Sections: %lu (0x%08lx)", u, u);
+	u=buffer[16]+256*(buffer[17]+256*(buffer[18]+256*buffer[19]));
+	out_nl(3,"Complete duration: %lums (%02lu:%02lu:%02lu.%lu)",
+	       u, (u / 1000 / 60 / 60), ((u / 1000 / 60) % 60),
+	       ((u / 1000) % 60), ( u % 1000 ) );
+	u=buffer[20]+256*(buffer[21]+256*(buffer[22]+256*buffer[23]));
+	out_nl(3,"Number of streams: %lu",u);
+	out(3,"Stream PIDs:");
+	for (n=0;(n<u) && (n<8);n++) {
+	    pid=buffer[24+2*n]+256*buffer[25+2*n];
+	    out(3," %d (0x%04x)",pid,pid);
+	}
+	out_NL(3);
+	out_nl(3,"12 unknown: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[40], buffer[41], buffer[42], buffer[43],
+	       buffer[44], buffer[45], buffer[46], buffer[47],
+	       buffer[48], buffer[49], buffer[50], buffer[51]);
+	u=buffer[52]+256*(buffer[53]+256*(buffer[54]+256*buffer[55]));
+	n=buffer[56]+256*(buffer[57]+256*(buffer[58]+256*buffer[59]));
+	if ( ( u == 0x00676572 ) && ( n == 0x00667265 ) )
+	    out_nl(3,"Aspect ratio: 4:3");
+	else if ( ( u = 0x00326368 ) && ( n == 0x00646400 ) )
+	    out_nl(3,"Aspect ratio: 16:9");
+	else
+	    out_nl(3,"Aspect ratio magic 1 and 2: 0x08lx 0x08lx", u, n);
+	out_nl(3,"20 reserved: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x", 
+	       buffer[60], buffer[61], buffer[62], buffer[63], buffer[64],
+	       buffer[65], buffer[66], buffer[67], buffer[68], buffer[69] );
+	out_nl(3,"             0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x", 
+	       buffer[70], buffer[71], buffer[72], buffer[73], buffer[74],
+	       buffer[75], buffer[76], buffer[77], buffer[78], buffer[79] );
+	u=buffer[80]+256*(buffer[81]+256*(buffer[82]+256*buffer[83]));
+	out_nl(3,"Elapsed duration: %lums (%02lu:%02lu:%02lu.%lu)",
+	       u, (u / 1000 / 60 / 60), ((u / 1000 / 60) % 60),
+	       ((u / 1000) % 60), ( u % 1000 ) );
+	out_nl(3,"4 Unkown: 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[84], buffer[85], buffer[86], buffer[87]);
+	out_nl(3,"4 Reserved: 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[88], buffer[89], buffer[90], buffer[91]);
+	if ( buffer[92] == 0x02 )
+	    out_nl(3,"Kind of title: Station name");
+	else if ( buffer[92] == 0x08 )
+	    out_nl(3,"Kind of title: Movie name");
+	else
+	    out_nl(3,"Kind of title: unknown %d (0x%02x)", 
+		   buffer[92], buffer[92] );
+	out(3,"Title: ");
+	printasciiline_buf(3,buffer+93,63);
+	out_nl(3,"12 reserved: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[156], buffer[157], buffer[158], buffer[159],
+	       buffer[160], buffer[161], buffer[162], buffer[163],
+	       buffer[164], buffer[165], buffer[166], buffer[167]);
+	out_nl(3,"5 unknown: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[168], buffer[169], buffer[170], buffer[171], buffer[172]);
+	out_nl(3,"11 reserved: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
+	       buffer[173], buffer[174], buffer[175], buffer[176],
+	       buffer[177], buffer[178], buffer[179], buffer[180],
+	       buffer[181], buffer[182], buffer[183] );
+	out_NL(3);
+	indent (-1);
+
+
+	bufpos = 0;
+    }
+    
+    return bufpos;
+}
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/ts_comag.h dvbsnoop-1.4.50mk/src/ts/ts_comag.h
--- dvbsnoop-1.4.50/src/ts/ts_comag.h	1970-01-01 01:00:00.000000000 +0100
+++ dvbsnoop-1.4.50mk/src/ts/ts_comag.h	2009-01-08 18:05:18.000000000 +0100
@@ -0,0 +1,43 @@
+/*
+$Id: ts_misc.c,v 1.2 2006/07/19 20:05:46 rasc Exp $
+
+
+ DVBSNOOP
+
+ a dvb sniffer  and mpeg2 stream analyzer tool
+ http://dvbsnoop.sourceforge.net/
+
+ (c) 2009   Markus.Kohm at gmx DOT de
+
+
+
+ -- Transport Stream Comag routines
+
+   
+
+
+$Log:$
+
+*/
+
+
+
+
+#include "dvbsnoop.h"
+#include "ts_misc.h"
+#include "ts_cc_check.h"
+
+#include "strings/dvb_str.h"
+#include "misc/output.h"
+
+
+
+
+//
+// -- Subdecode Comag PVR2/100CI Null Packet
+// -- Print Null Packet Data
+// -- Return: buffer position
+//
+extern int comag_PVR2_100_CI_subdecode(u_char *b,int len);
+
+extern int comag_PVR2_100_CI_checkAndDo_subdecode_Output();
diff -u -r --new-file '--exclude=Makefile' '--exclude=*.Po' '--exclude=*~' dvbsnoop-1.4.50/src/ts/tslayer.c dvbsnoop-1.4.50mk/src/ts/tslayer.c
--- dvbsnoop-1.4.50/src/ts/tslayer.c	2006-07-20 00:49:24.000000000 +0200
+++ dvbsnoop-1.4.50mk/src/ts/tslayer.c	2009-01-08 17:36:19.000000000 +0100
@@ -153,7 +153,7 @@
        // -- subdecode prev. collected TS data
        // -- push new data
        if (opt->printdecode && opt->ts_subdecode) {
-	       ts2SecPes_subdecode (b, len, pid);
+	 ts2SecPes_subdecode (b, len, pid, opt->ts_comagPVR2_100CI);
        }
 
 
