[Mplayer-cvslog] CVS: main/libmpdemux aviheader.c,1.36,1.37
Arpi of Ize
arpi at mplayer.dev.hu
Thu Dec 27 01:37:05 CET 2001
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv17046
Modified Files:
aviheader.c
Log Message:
better, nicer progress status for index generation
Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- aviheader.c 25 Dec 2001 19:25:27 -0000 1.36
+++ aviheader.c 27 Dec 2001 00:37:03 -0000 1.37
@@ -223,8 +223,22 @@
case 2: if(c==0x1B6) idx->dwFlags=0;break; // divx 4
}
}
- mp_msg(MSGT_HEADER,MSGL_STATUS,"Generating Index: %02d (byteposition)\r", (int)demuxer->filepos/((int)demuxer->movi_end/100+1));
- fflush(stdout);
+
+ // update status line:
+ { static int lastpos;
+ int pos;
+ off_t len=demuxer->movi_end-demuxer->movi_start;
+ if(len){
+ pos=100*(demuxer->filepos-demuxer->movi_start)/len; // %
+ } else {
+ pos=(demuxer->filepos-demuxer->movi_start)>>20; // MB
+ }
+ if(pos!=lastpos){
+ lastpos=pos;
+ mp_msg(MSGT_HEADER,MSGL_STATUS,"Generating Index: %3d %s \r",
+ pos, len?"%":"MB");
+ }
+ }
mp_dbg(MSGT_HEADER,MSGL_DBG2,"%08X %08X %.4s %08X %X\n",(int)demuxer->filepos,id,(char *) &id,(int)c,(unsigned int) idx->dwFlags);
#if 0
{ unsigned char tmp[64];
More information about the MPlayer-cvslog
mailing list