[Mplayer-cvslog] CVS: main mplayer.c,1.534,1.535
Zoltan Ponekker
pontscho at mplayerhq.hu
Tue Jul 30 13:46:41 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv7545
Modified Files:
mplayer.c
Log Message:
fix audio files (mp3,wav) position calc
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.534
retrieving revision 1.535
diff -u -r1.534 -r1.535
--- mplayer.c 26 Jul 2002 21:26:30 -0000 1.534
+++ mplayer.c 30 Jul 2002 11:46:29 -0000 1.535
@@ -2919,7 +2919,9 @@
} else {
// get pos from file position / filesize
int len=((demuxer->movi_end-demuxer->movi_start));
- int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos;
+ int pos;
+ if ( demuxer->file_format==DEMUXER_TYPE_AUDIO ) pos=stream->pos;
+ else pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos;
guiIntfStruct.Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f);
}
if ( sh_video ) guiIntfStruct.TimeSec=d_video->pts;
More information about the MPlayer-cvslog
mailing list