Mercurial > mplayer.hg
comparison mplayer.c @ 1481:db2a6ae7e296
AVI pts/seek fixes, VBR support, faster NI seek
author | arpi |
---|---|
date | Sat, 11 Aug 2001 00:53:45 +0000 |
parents | 6f9167f0fcca |
children | b895f95e7657 |
comparison
equal
deleted
inserted
replaced
1480:a7a59a391a01 | 1481:db2a6ae7e296 |
---|---|
1355 float delay=(float)delay_bytes/(float)sh_audio->o_bps; | 1355 float delay=(float)delay_bytes/(float)sh_audio->o_bps; |
1356 | 1356 |
1357 if(pts_from_bps){ | 1357 if(pts_from_bps){ |
1358 // PTS = (audio position)/(bytes per sec) | 1358 // PTS = (audio position)/(bytes per sec) |
1359 // a_pts=(ds_tell(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps; | 1359 // a_pts=(ds_tell(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps; |
1360 a_pts=(ds_tell(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->wf->nAvgBytesPerSec; | 1360 if(sh_audio->audio.dwSampleSize) |
1361 // delay_corrected=1; // hack | 1361 a_pts=(ds_tell(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->wf->nAvgBytesPerSec; |
1362 else // VBR: | |
1363 a_pts=d_audio->pack_no*(float)sh_audio->audio.dwScale/(float)sh_audio->audio.dwRate; | |
1362 v_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; | 1364 v_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; |
1363 if(verbose)printf("%5.3f|",v_pts-d_video->pts); | 1365 if(verbose)printf("%5.3f|",v_pts-d_video->pts); |
1364 } else { | 1366 } else { |
1365 if(!delay_corrected && d_audio->pts){ | 1367 if(!delay_corrected && d_audio->pts){ |
1366 // float x=d_audio->pts-d_video->pts-(delay); | 1368 // float x=d_audio->pts-d_video->pts-(delay); |