[vlc-commits] Use CLOCK_FREQ
Rémi Denis-Courmont
git at videolan.org
Sat Aug 6 15:28:39 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 6 15:38:30 2011 +0300| [f50f57ffef8d038ba6e8e6fe9dfb13ef0a9e19c1] | committer: Rémi Denis-Courmont
Use CLOCK_FREQ
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f50f57ffef8d038ba6e8e6fe9dfb13ef0a9e19c1
---
modules/gui/qt4/input_manager.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 668c143..b050d80 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -24,6 +24,7 @@
*****************************************************************************/
#define __STDC_FORMAT_MACROS 1
+#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -407,7 +408,7 @@ void InputManager::UpdatePosition()
int i_length;
int64_t i_time;
float f_pos;
- i_length = var_GetTime( p_input , "length" ) / 1000000;
+ i_length = var_GetTime( p_input , "length" ) / CLOCK_FREQ;
i_time = var_GetTime( p_input , "time");
f_pos = var_GetFloat( p_input , "position" );
emit positionUpdated( f_pos, i_time, i_length );
@@ -882,7 +883,7 @@ void InputManager::jumpFwd()
int i_interval = var_InheritInteger( p_input, "short-jump-size" );
if( i_interval > 0 )
{
- mtime_t val = (mtime_t)(i_interval) * 1000000L;
+ mtime_t val = CLOCK_FREQ * i_interval;
var_SetTime( p_input, "time-offset", val );
}
}
@@ -892,7 +893,7 @@ void InputManager::jumpBwd()
int i_interval = var_InheritInteger( p_input, "short-jump-size" );
if( i_interval > 0 )
{
- mtime_t val = -1 *(mtime_t)(i_interval) * 1000000L;
+ mtime_t val = -CLOCK_FREQ * i_interval;
var_SetTime( p_input, "time-offset", val );
}
}
More information about the vlc-commits
mailing list