comparison 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
comparison
equal deleted inserted replaced
16874:debd99a161e0 16875:4951a3abcd1a
1396 ); 1396 );
1397 #endif 1397 #endif
1398 1398
1399 { float t=(GetTimerMS()-timer_start)*0.001f; 1399 { float t=(GetTimerMS()-timer_start)*0.001f;
1400 float len=(demuxer->movi_end-demuxer->movi_start); 1400 float len=(demuxer->movi_end-demuxer->movi_start);
1401 float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len : 0; 1401 float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len :
1402 (demuxer_get_percent_pos(demuxer) / 100.0);
1402 #if 0 1403 #if 0
1403 if(!len && sh_audio && sh_audio->audio.dwLength>100){ 1404 if(!len && sh_audio && sh_audio->audio.dwLength>100){
1404 p=(sh_audio->audio.dwSampleSize? ds_tell(sh_audio->ds)/sh_audio->audio.dwSampleSize : sh_audio->ds->block_no) 1405 p=(sh_audio->audio.dwSampleSize? ds_tell(sh_audio->ds)/sh_audio->audio.dwSampleSize : sh_audio->ds->block_no)
1405 / (float)(sh_audio->audio.dwLength); 1406 / (float)(sh_audio->audio.dwLength);
1406 } 1407 }