Mercurial > mplayer.hg
diff mencoder.c @ 16875:4951a3abcd1a
Provide percentage even when demuxer->movi_start and movi_end are not available
author | reimar |
---|---|
date | Sun, 30 Oct 2005 09:11:40 +0000 |
parents | a5ff3d90f16d |
children | 3047b92e8402 |
line wrap: on
line diff
--- a/mencoder.c Sun Oct 30 08:45:24 2005 +0000 +++ b/mencoder.c Sun Oct 30 09:11:40 2005 +0000 @@ -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)