1 --- mplayer/mplayer.c.orig 2007-03-02 13:20:05.000000000 -0800
2 +++ mplayer/mplayer.c 2007-03-02 13:20:39.000000000 -0800
11 + if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video->video.dwLength>2) {
12 + // get pos from frame number / total frames
13 + position=(float)mpctx->d_video->pack_no*100.0/(float)mpctx->sh_video->video.dwLength;
16 + off_t len = ( mpctx->demuxer->movi_end - mpctx->demuxer->movi_start );
17 + off_t pos = ( mpctx->demuxer->file_format == DEMUXER_TYPE_AUDIO?mpctx->stream->pos:mpctx->demuxer->filepos );
18 + if(len>0) position=( pos - mpctx->demuxer->movi_start ) * 100.0 / len;
20 + if(mpctx->sh_video) time=mpctx->d_video->pts;
21 + else if(mpctx->sh_audio) time=mpctx->sh_audio->delay;
22 + mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);