[Mplayer-cvslog] CVS: main/libmpdemux demux_asf.c,1.28,1.29

Alex Beregszaszi syncmail at mplayerhq.hu
Wed Jul 21 10:54:41 CEST 2004


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv112

Modified Files:
	demux_asf.c 
Log Message:
skip ecc only if present, patch by Alexis Durelle <alexis.durelle at cen.cnamts.fr> (needed for the Aiptek DV3500 camera)

Index: demux_asf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_asf.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- demux_asf.c	7 Sep 2003 01:41:09 -0000	1.28
+++ demux_asf.c	21 Jul 2004 08:54:39 -0000	1.29
@@ -152,8 +152,8 @@
     stream_read(demux->stream,asf_packet,asf_packetsize);
     if(demux->stream->eof) return 0; // EOF
     
-    {	    unsigned char ecc_flags=asf_packet[0];
-	    unsigned char* p=&asf_packet[1+(ecc_flags&15)];
+    {
+	    unsigned char* p=asf_packet;
             unsigned char* p_end=asf_packet+asf_packetsize;
             unsigned char flags=p[0];
             unsigned char segtype=p[1];
@@ -173,6 +173,16 @@
                 printf("\n");
             }
             
+	    // skip ECC data if present by testing bit 7 of flags
+	    // 1xxxbbbb -> ecc data present, skip bbbb byte(s)
+	    // 0xxxxxxx -> payload parsing info starts
+	    if (flags & 0x80)
+	    {
+		p += (flags & 0x0f)+1;
+		flags = p[0];
+		segtype = p[1];
+	    }
+	    
             //if(segtype!=0x5d) printf("Warning! packet[4] != 0x5d  \n");
 
 	    p+=2; // skip flags & segtype




More information about the MPlayer-cvslog mailing list