1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 21:31:13 +00:00

use demuxer->stream_pts rather than stream_control(STREAM_CTRL_GET_CURRENT_TIME)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21798 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-12-31 11:09:53 +00:00
parent 33ce3088d1
commit 8558d03eb9

View File

@ -1055,9 +1055,9 @@ int demuxer_get_current_time(demuxer_t *demuxer){
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;
}