diff options
author | 2001-06-01 20:13:48 +0000 | |
---|---|---|
committer | 2001-06-01 20:13:48 +0000 | |
commit | fdbfb285735079c18d4592f1f751559ae6d24582 (patch) | |
tree | b372852cb3d332c710c5922f5dabf0ef32b8f884 /mplayer.c | |
parent | 619fa401bb417f3a7978e378a21848dcd191f104 (diff) |
-nobps seeking fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@934 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -471,6 +471,7 @@ float default_max_pts_correction=-1;//0.01f; int delay_corrected=1; float force_fps=0; float audio_delay=0; +float initial_pts_delay=0; int vcd_track=0; #ifdef VCD_CACHE int vcd_cache_size=128; @@ -1980,6 +1981,7 @@ switch(sh_video->codec->driver){ float x=d_audio->pts-d_video->pts-(delay+audio_delay); float y=-(delay+audio_delay); printf("Initial PTS delay: %5.3f sec (calculated: %5.3f)\n",x,y); + initial_pts_delay+=x; audio_delay+=x; delay_corrected=1; if(verbose) @@ -1992,7 +1994,7 @@ switch(sh_video->codec->driver){ v_pts=d_video->pts-frame_time; } - if(verbose)printf("### A:%8.3f (%8.3f) V:%8.3f A-V:%7.4f \n",a_pts,a_pts-audio_delay-delay,v_pts,(a_pts-delay-audio_delay)-v_pts); + if(verbose>1)printf("### A:%8.3f (%8.3f) V:%8.3f A-V:%7.4f \n",a_pts,a_pts-audio_delay-delay,v_pts,(a_pts-delay-audio_delay)-v_pts); if(frame_corr_num==1){ float x=frame_correction; @@ -2274,6 +2276,7 @@ switch(file_format){ // update stream position: d_audio->pos=audio_chunk_pos; d_audio->dpos=apos; + d_audio->pts=initial_pts_delay+(float)apos/(float)sh_audio->wf->nAvgBytesPerSec; demuxer->idx_pos_a=demuxer->idx_pos_v=demuxer->idx_pos=audio_chunk_pos; if(!(sh_audio->codec->flags&CODECS_FLAG_SEEKABLE)){ |