[Mplayer-cvslog] CVS: main/libmpdemux demux_avi.c,1.37,1.38

Arpi of Ize arpi at mplayer.dev.hu
Tue Feb 12 09:27:58 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv24642

Modified Files:
	demux_avi.c 
Log Message:
ehh. forgot to commit this one...
- workaround for files with bad index (first chunk absolute, other
relative offsets) -> fixes many 'no video stream found' bugreports


Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- demux_avi.c	4 Dec 2001 00:26:21 -0000	1.37
+++ demux_avi.c	12 Feb 2002 08:27:49 -0000	1.38
@@ -417,13 +417,24 @@
   priv->idx_pos=0;
   priv->idx_pos_a=0;
   priv->idx_pos_v=0;
-  if(priv->idx_size>0){
+  if(priv->idx_size>1){
     // decide index format:
+#if 1
+    if(((AVIINDEXENTRY *)priv->idx)[0].dwChunkOffset<demuxer->movi_start ||
+       ((AVIINDEXENTRY *)priv->idx)[1].dwChunkOffset<demuxer->movi_start)
+      priv->idx_offset=demuxer->movi_start-4;
+    else
+      priv->idx_offset=0;
+#else
     if(((AVIINDEXENTRY *)priv->idx)[0].dwChunkOffset<demuxer->movi_start)
       priv->idx_offset=demuxer->movi_start-4;
     else
       priv->idx_offset=0;
-    mp_msg(MSGT_DEMUX,MSGL_V,"AVI index offset: %d\n",priv->idx_offset);
+#endif
+    mp_msg(MSGT_DEMUX,MSGL_V,"AVI index offset: 0x%X (movi=0x%X idx0=0x%X idx1=0x%X)\n",
+	    (int)priv->idx_offset,(int)demuxer->movi_start,
+	    (int)((AVIINDEXENTRY *)priv->idx)[0].dwChunkOffset,
+	    (int)((AVIINDEXENTRY *)priv->idx)[1].dwChunkOffset);
   }
 //  demuxer->endpos=avi_header.movi_end;
   




More information about the MPlayer-cvslog mailing list