From 2788b2cbe68b4b481f3a080658cc433d2927b4fb Mon Sep 17 00:00:00 2001 From: chriszero Date: Sun, 15 Mar 2015 12:17:26 +0100 Subject: Fixes display of total time for webvideos (Vimeo, Youtube, ...) --- hlsPlayer.cpp | 2 +- hlsPlayerControl.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hlsPlayer.cpp b/hlsPlayer.cpp index 1c1f4a3..ca1d91f 100644 --- a/hlsPlayer.cpp +++ b/hlsPlayer.cpp @@ -608,7 +608,7 @@ void cHlsPlayer::Stop(void) double cHlsPlayer::FramesPerSecond(void) { - return m_Video.m_Media.m_VideoFrameRate ? m_Video.m_Media.m_VideoFrameRate : DEFAULTFRAMESPERSECOND; + return m_Video.m_Media.m_VideoFrameRate > 0 ? m_Video.m_Media.m_VideoFrameRate : DEFAULTFRAMESPERSECOND; } void cHlsPlayer::JumpRelative(int seconds) diff --git a/hlsPlayerControl.cpp b/hlsPlayerControl.cpp index 309c257..360e3ec 100644 --- a/hlsPlayerControl.cpp +++ b/hlsPlayerControl.cpp @@ -262,14 +262,10 @@ bool cHlsPlayerControl::ShowProgress(bool Initial) int Index = Total; if (Setup.ShowRemainingTime) Index = Current - Index; - if(Total == 0) // Webstreams - Index = Current; displayReplay->SetTotal(IndexToHMSF(Index, false, FramesPerSecond())); if (!Initial) displayReplay->Flush(); } - if(Total == 0) // Webstreams - Total = Current; displayReplay->SetProgress(Current, Total); if (!Initial) displayReplay->Flush(); -- cgit v1.2.3