Mercurial > mplayer.hg
changeset 21782:99ab6c41eb1e
use demuxer->stream_pts rather than stream_control(STREAM_CTRL_GET_CURRENT_TIME)
author | nicodvb |
---|---|
date | Sun, 31 Dec 2006 11:09:53 +0000 |
parents | 36112fcf78d6 |
children | 4511c04bc4a0 |
files | libmpdemux/demuxer.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demuxer.c Sun Dec 31 11:08:27 2006 +0000 +++ b/libmpdemux/demuxer.c Sun Dec 31 11:09:53 2006 +0000 @@ -1055,9 +1055,9 @@ double get_time_ans = 0; double tm; sh_video_t *sh_video = demuxer->video->sh; - if(stream_control(demuxer->stream, STREAM_CTRL_GET_CURRENT_TIME,(void *)&tm)!=STREAM_UNSUPORTED) { - get_time_ans = tm; - } else if(sh_video) get_time_ans = sh_video->pts; + if(demuxer->stream_pts != MP_NOPTS_VALUE) + get_time_ans = demuxer->stream_pts; + else if(sh_video) get_time_ans = sh_video->pts; return (int) get_time_ans; }