[vlc-commits] skins2: explicitly convert vlc_tick_t values to second strings
Steve Lhomme
git at videolan.org
Thu Jul 5 16:57:25 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 12:15:09 2018 +0200| [91f0cd29fc539458c06bbb3b63fab364753bb769] | committer: Steve Lhomme
skins2: explicitly convert vlc_tick_t values to second strings
using SEC_FROM_VLC_TICK()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91f0cd29fc539458c06bbb3b63fab364753bb769
---
modules/gui/skins2/vars/time.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/skins2/vars/time.cpp b/modules/gui/skins2/vars/time.cpp
index 8ca8c4a213..9d33a8799d 100644
--- a/modules/gui/skins2/vars/time.cpp
+++ b/modules/gui/skins2/vars/time.cpp
@@ -78,7 +78,7 @@ std::string StreamTime::getAsStringCurrTime( bool bShortFormat ) const
return "-:--:--";
vlc_tick_t time = var_GetInteger( getIntf()->p_sys->p_input, "time" );
- return formatTime( time / CLOCK_FREQ, bShortFormat );
+ return formatTime( SEC_FROM_VLC_TICK(time), bShortFormat );
}
@@ -90,7 +90,7 @@ std::string StreamTime::getAsStringTimeLeft( bool bShortFormat ) const
vlc_tick_t time = var_GetInteger( getIntf()->p_sys->p_input, "time" ),
duration = var_GetInteger( getIntf()->p_sys->p_input, "length" );
- return formatTime( (duration - time) / CLOCK_FREQ, bShortFormat );
+ return formatTime( SEC_FROM_VLC_TICK(duration - time), bShortFormat );
}
@@ -100,5 +100,5 @@ std::string StreamTime::getAsStringDuration( bool bShortFormat ) const
return "-:--:--";
vlc_tick_t time = var_GetInteger( getIntf()->p_sys->p_input, "length" );
- return formatTime( time / CLOCK_FREQ, bShortFormat );
+ return formatTime( SEC_FROM_VLC_TICK(time), bShortFormat );
}
More information about the vlc-commits
mailing list