[Mplayer-cvslog] CVS: main/libmpdemux aviheader.c,1.59,1.60

Tobias Diedrich CVS syncmail at mplayerhq.hu
Thu Jul 1 00:50:58 CEST 2004


CVS change done by Tobias Diedrich CVS

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

Modified Files:
	aviheader.c 
Log Message:
We still need to make sure the upper 16 bits of dwFlags are cleared

Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- aviheader.c	30 Jun 2004 22:29:23 -0000	1.59
+++ aviheader.c	30 Jun 2004 22:50:56 -0000	1.60
@@ -369,8 +369,16 @@
       priv->idx=malloc(priv->idx_size<<4);
 //      printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv);
       stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4);
-      for (i = 0; i < priv->idx_size; i++)	// swap index to machine endian
-	le2me_AVIINDEXENTRY((AVIINDEXENTRY*)priv->idx + i);
+      for (i = 0; i < priv->idx_size; i++) {	// swap index to machine endian
+	AVIINDEXENTRY *entry=(AVIINDEXENTRY*)priv->idx + i;
+	le2me_AVIINDEXENTRY(entry);
+	/*
+	 * We (ab)use the upper word for bits 32-47 of the offset, so
+	 * we'll clear them here.
+	 * FIXME: AFAIK no codec uses them, but if one does it will break
+	 */
+	entry->dwFlags&=0xffff;
+      }
       chunksize-=priv->idx_size<<4;
       if(verbose>=2) print_index(priv->idx,priv->idx_size);
     }




More information about the MPlayer-cvslog mailing list