[Mplayer-cvslog] CVS: main/libmpdemux aviheader.c,1.47,1.48
Arpi of Ize
arpi at mplayerhq.hu
Wed Oct 16 23:04:36 CEST 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv25409
Modified Files:
aviheader.c
Log Message:
10l - do not read INDEX twice!!!
list index even if generated by mplayer (verbose>=2)
Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- aviheader.c 2 Jun 2002 21:35:49 -0000 1.47
+++ aviheader.c 16 Oct 2002 21:04:19 -0000 1.48
@@ -65,8 +65,8 @@
if(demuxer->stream->end_pos>demuxer->movi_end) demuxer->movi_end=demuxer->stream->end_pos;
if(index_mode==-2 || index_mode==2 || index_mode==0)
break; // reading from non-seekable source (stdin) or forced index or no index forced
- len=(len+1)&(~1);
- stream_skip(demuxer->stream,len);
+ if(list_end>0) stream_seek(demuxer->stream,list_end); // skip movi
+ list_end=0;
}
continue;
}
@@ -248,9 +248,10 @@
if(index_mode){
int i;
priv->idx_size=size2>>4;
- mp_msg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %ld frames\n",
- priv->idx_size,avih.dwTotalFrames);
+ mp_msg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %ld frames (fpos=%p)\n",
+ priv->idx_size,avih.dwTotalFrames, stream_tell(demuxer->stream));
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);
@@ -379,6 +380,7 @@
}
priv->idx_size=priv->idx_pos;
mp_msg(MSGT_HEADER,MSGL_INFO,"AVI: Generated index table for %d chunks!\n",priv->idx_size);
+ if(verbose>=2) print_index(priv->idx,priv->idx_size);
}
}
More information about the MPlayer-cvslog
mailing list