[vlc-commits] VLCBookmarksWindowController: use vlc_tick_from_sec function to read the bookmark time

Steve Lhomme git at videolan.org
Fri Jul 6 16:07:44 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 15 06:43:28 2018 +0200| [abe28eef78e85423038c3344cef151d63b67db19] | committer: Steve Lhomme

VLCBookmarksWindowController: use vlc_tick_from_sec function to read the bookmark time

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

 modules/gui/macosx/VLCBookmarksWindowController.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCBookmarksWindowController.m b/modules/gui/macosx/VLCBookmarksWindowController.m
index 5650ff3c93..b081b2337f 100644
--- a/modules/gui/macosx/VLCBookmarksWindowController.m
+++ b/modules/gui/macosx/VLCBookmarksWindowController.m
@@ -241,11 +241,11 @@
     NSArray * components = [[_editTimeTextField stringValue] componentsSeparatedByString:@":"];
     NSUInteger componentCount = [components count];
     if (componentCount == 1)
-        pp_bookmarks[i]->i_time_offset = 1000000LL * ([[components firstObject] floatValue]);
+        pp_bookmarks[i]->i_time_offset = vlc_tick_from_sec([[components firstObject] floatValue]);
     else if (componentCount == 2)
         pp_bookmarks[i]->i_time_offset = vlc_tick_from_sec([[components firstObject] longLongValue] * 60 + [[components objectAtIndex:1] longLongValue]);
     else if (componentCount == 3)
-        pp_bookmarks[i]->i_time_offset = 1000000LL * ([[components firstObject] longLongValue] * 3600 + [[components objectAtIndex:1] longLongValue] * 60 + [[components objectAtIndex:2] floatValue]);
+        pp_bookmarks[i]->i_time_offset = vlc_tick_from_sec([[components firstObject] longLongValue] * 3600 + [[components objectAtIndex:1] longLongValue] * 60 + [[components objectAtIndex:2] floatValue]);
     else {
         msg_Err(getIntf(), "Invalid string format for time");
         goto clear;



More information about the vlc-commits mailing list