[vlc-commits] macosx: read the input "time" as vlc_tick_t

Steve Lhomme git at videolan.org
Fri Jul 6 12:42:14 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat May  5 17:17:43 2018 +0200| [ef3bc4614a7a8247902805312918ce0e85e9d06b] | committer: Steve Lhomme

macosx: read the input "time" as vlc_tick_t

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

 modules/gui/macosx/VLCFSPanelController.m | 2 +-
 modules/gui/macosx/VLCMainMenu.m          | 4 ++--
 modules/gui/macosx/VLCStringUtility.m     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/VLCFSPanelController.m b/modules/gui/macosx/VLCFSPanelController.m
index d3e08509ab..cf65ad197c 100644
--- a/modules/gui/macosx/VLCFSPanelController.m
+++ b/modules/gui/macosx/VLCFSPanelController.m
@@ -253,7 +253,7 @@ static NSString *kAssociatedFullscreenRect = @"VLCFullscreenAssociatedWindowRect
     [_timeSlider setFloatValue:f_updated];
 
 
-    int64_t t = var_GetInteger(p_input, "time");
+    vlc_tick_t t = var_GetInteger(p_input, "time");
     vlc_tick_t dur = input_item_GetDuration(input_GetItem(p_input));
 
     /* Update total duration (right field) */
diff --git a/modules/gui/macosx/VLCMainMenu.m b/modules/gui/macosx/VLCMainMenu.m
index 21d8f2570a..93bf7f1455 100644
--- a/modules/gui/macosx/VLCMainMenu.m
+++ b/modules/gui/macosx/VLCMainMenu.m
@@ -837,8 +837,8 @@
         /* we can obviously only do that if an input is available */
         int64_t length = var_GetInteger(p_input, "length");
         [_timeSelectionPanel setMaxValue:(int)(length / CLOCK_FREQ)];
-        int64_t pos = var_GetInteger(p_input, "time");
-        [_timeSelectionPanel setJumpTimeValue: (int)(pos / CLOCK_FREQ)];
+        vlc_tick_t pos = var_GetInteger(p_input, "time");
+        [_timeSelectionPanel setJumpTimeValue: (int)SEC_FROM_VLC_TICK(pos)];
         [_timeSelectionPanel runModalForWindow:[NSApp mainWindow]
                              completionHandler:^(NSInteger returnCode, int64_t returnTime) {
 
diff --git a/modules/gui/macosx/VLCStringUtility.m b/modules/gui/macosx/VLCStringUtility.m
index 3cb41e8938..307fcc78fb 100644
--- a/modules/gui/macosx/VLCStringUtility.m
+++ b/modules/gui/macosx/VLCStringUtility.m
@@ -111,7 +111,7 @@ NSString *const kVLCMediaUnknown = @"Unknown";
     assert(p_input != nil);
 
     char psz_time[MSTRTIME_MAX_SIZE];
-    int64_t t = var_GetInteger(p_input, "time");
+    vlc_tick_t t = var_GetInteger(p_input, "time");
 
     vlc_tick_t dur = input_item_GetDuration(input_GetItem(p_input));
     if (b_negative && dur > 0) {



More information about the vlc-commits mailing list