[MPlayer-cvslog] CVS: main mencoder.c,1.317,1.318

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Oct 30 10:11:43 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv25988

Modified Files:
	mencoder.c 
Log Message:
Provide percentage even when demuxer->movi_start and movi_end are not available


Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -r1.317 -r1.318
--- mencoder.c	23 Oct 2005 15:05:11 -0000	1.317
+++ mencoder.c	30 Oct 2005 09:11:40 -0000	1.318
@@ -1398,7 +1398,8 @@
 
     {	float t=(GetTimerMS()-timer_start)*0.001f;
 	float len=(demuxer->movi_end-demuxer->movi_start);
-	float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len : 0;
+	float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len :
+                (demuxer_get_percent_pos(demuxer) / 100.0);
 #if 0
 	if(!len && sh_audio && sh_audio->audio.dwLength>100){
 	    p=(sh_audio->audio.dwSampleSize? ds_tell(sh_audio->ds)/sh_audio->audio.dwSampleSize : sh_audio->ds->block_no)




More information about the MPlayer-cvslog mailing list