[Mplayer-cvslog] CVS: main mplayer.c,1.538,1.539

Zoltan Ponekker pontscho at mplayerhq.hu
Mon Aug 5 03:14:45 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv17005

Modified Files:
	mplayer.c 
Log Message:


- fix equ handling
- fix dvd pos bar
- fix 10l bug in evLoadPlay bugfix :)
- mittomen


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -r1.538 -r1.539
--- mplayer.c	4 Aug 2002 19:23:55 -0000	1.538
+++ mplayer.c	5 Aug 2002 01:14:12 -0000	1.539
@@ -1358,7 +1358,7 @@
      guiGetEvent( guiSetFileName,filename );
      if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0;
      if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 );
-     guiGetEvent( guiSetValues,NULL );
+     guiGetEvent( guiSetValues,(char *)sh_video );
     }
 #endif
 
@@ -2920,12 +2920,9 @@
 	  // get pos from frame number / total frames
 	  guiIntfStruct.Position=(float)d_video->pack_no*100.0f/sh_video->video.dwLength;
 	} else {
-	  // get pos from file position / filesize
-          int len=((demuxer->movi_end-demuxer->movi_start));
-	  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);
+	 int len = ( ( demuxer->movi_end - demuxer->movi_start ) >> 8 );
+	 int pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
+	 guiIntfStruct.Position=(len <= 0? 0.0f : ( pos - demuxer->movi_start ) / len / 2.56f /* / 256.0f * 100.0f */ );
 	}
 	if ( sh_video ) guiIntfStruct.TimeSec=d_video->pts;
 	  else if ( sh_audio ) guiIntfStruct.TimeSec=sh_audio->timer;




More information about the MPlayer-cvslog mailing list