Mercurial > mplayer.hg
diff libmpdemux/demux_audio.c @ 18710:c528c6c518f1
Clean up audio pts handling, make audio pts tracking in the audio-only
case work the same as with video.
author | uau |
---|---|
date | Wed, 14 Jun 2006 19:48:54 +0000 |
parents | 9e2b300db17b |
children | 83c3afeab35d |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Wed Jun 14 16:08:49 2006 +0000 +++ b/libmpdemux/demux_audio.c Wed Jun 14 19:48:54 2006 +0000 @@ -620,8 +620,7 @@ } resize_demux_packet(dp, l); - ds->pts = priv->last_pts - (ds_tell_pts(demux->audio) - - sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps; + dp->pts = priv->last_pts; ds_add_packet(ds, dp); return 1; } @@ -667,7 +666,6 @@ } if(len > 0) high_res_mp3_seek(demuxer,len); - sh_audio->delay = priv->last_pts - (ds_tell_pts(demuxer->audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps; return; } @@ -679,13 +677,10 @@ if(demuxer->movi_end && pos >= demuxer->movi_end) { pos = demuxer->movi_end; - //sh_audio->delay = (stream_tell(s) - demuxer->movi_start)/(float)sh_audio->i_bps; - //return; } else if(pos < demuxer->movi_start) pos = demuxer->movi_start; priv->last_pts = (pos-demuxer->movi_start)/(float)sh_audio->i_bps; - sh_audio->delay = priv->last_pts - (ds_tell_pts(demuxer->audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps; switch(priv->frmt) { case WAV: