From 9e1ca6e687cc10fbac68108536b3c0b1fe7b2fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20B=C3=BChlmann?= Date: Sat, 13 May 2017 18:35:46 +0200 Subject: Fix seeking for pts values larger than max_int --- xbmc/cores/VideoPlayer/VideoPlayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp index f206847aa8..0285de264b 100644 --- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp +++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp @@ -2509,7 +2509,7 @@ void CVideoPlayer::HandleMessages() { double now = m_clock.GetAbsoluteClock(); if (m_playSpeed == DVD_PLAYSPEED_NORMAL && - DVD_TIME_TO_MSEC(now - m_State.lastSeek) < 2000 && + (now - m_State.lastSeek)/1000 < 2000 && !msg.GetAccurate()) { m_processInfo->SetStateSeeking(false); @@ -2528,7 +2528,7 @@ void CVideoPlayer::HandleMessages() double time = msg.GetTime(); if (msg.GetRelative()) - time = GetTime() + time; + time = (m_clock.GetClock() + m_State.time_offset) / 1000l + time; time = msg.GetRestore() ? m_Edl.RestoreCutTime(time) : time; @@ -2539,7 +2539,7 @@ void CVideoPlayer::HandleMessages() //! of the desired segment. With the current approach calculated time may point //! to nirvana if (m_pInputStream->GetIPosTime() == nullptr) - time -= DVD_TIME_TO_MSEC(m_State.time_offset); + time -= m_State.time_offset/1000; CLog::Log(LOGDEBUG, "demuxer seek to: %f", time); if (m_pDemuxer && m_pDemuxer->SeekTime(time, msg.GetBackward(), &start)) -- cgit v1.2.3