aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2017-05-14 17:51:55 +0200
committerGitHub <noreply@github.com>2017-05-14 17:51:55 +0200
commita5f98211437161878dd3e191de8729927a0cc094 (patch)
treead14d88721c4b2d7c6b2ab8595fdd463496c6cf2
parentc6420b54e39ea9444f7fb0756258a6d5397e9058 (diff)
parent9e1ca6e687cc10fbac68108536b3c0b1fe7b2fd6 (diff)
Merge pull request #12085 from rbuehlma/fix_seek_with_huge_pts
Fix seeking for pts values larger than max_int
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayer.cpp6
1 files 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))