vlc | branch: master | Steve Lhomme <[email protected]> | 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 ); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
