[vlc-commits] hotkeys: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()

Steve Lhomme git at videolan.org
Thu Jul 5 16:57:19 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 11:58:51 2018 +0200| [09d07968d66e88b7d6ee8c02639c69cb358243ed] | committer: Steve Lhomme

hotkeys: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()

Easier to read and more explicit.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09d07968d66e88b7d6ee8c02639c69cb358243ed
---

 modules/control/hotkeys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 4631812f58..1f2645bcbc 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -712,7 +712,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
         case ACTIONID_SUBDELAY_DOWN:
         case ACTIONID_SUBDELAY_UP:
         {
-            vlc_tick_t diff = (i_action == ACTIONID_SUBDELAY_UP) ? 50000 : -50000;
+            vlc_tick_t diff = (i_action == ACTIONID_SUBDELAY_UP) ? VLC_TICK_FROM_MS(50) : VLC_TICK_FROM_MS(-50);
             if( p_input )
             {
                 vlc_value_t val;
@@ -742,7 +742,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
         case ACTIONID_AUDIODELAY_DOWN:
         case ACTIONID_AUDIODELAY_UP:
         {
-            vlc_tick_t diff = (i_action == ACTIONID_AUDIODELAY_UP) ? 50000 : -50000;
+            vlc_tick_t diff = (i_action == ACTIONID_AUDIODELAY_UP) ? VLC_TICK_FROM_MS(50) : VLC_TICK_FROM_MS(-50);
             if( p_input )
             {
                 vlc_tick_t i_delay = var_GetInteger( p_input, "audio-delay" )



More information about the vlc-commits mailing list