1 diff -ruN ./mplayer.c /usr/src/MPlayer-0.90rc1/mplayer.c
2 --- ./mplayer.c Thu Dec 5 01:18:56 2002
3 +++ /usr/src/MPlayer-0.90rc1/mplayer.c Wed Dec 11 15:49:50 2002
12 + if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video->video.dwLength>2) {
13 + // get pos from frame number / total frames
14 + position=(float)d_video->pack_no*100.0/(float)sh_video->video.dwLength;
17 + off_t len = ( demuxer->movi_end - demuxer->movi_start );
18 + off_t pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
19 + if(len>0) position=( pos - demuxer->movi_start ) * 100.0 / len;
21 + if(sh_video) time=d_video->pts;
22 + else if(sh_audio) time=sh_audio->delay;
23 + mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);