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

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 15 09:44:59 2018 +0200| [2409c1324e7c18a29c0d20db7978c1c4b2583e2e] | committer: Steve Lhomme

qt: use vlc_tick_from_sec function to read the bookmark time

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

 modules/gui/qt/dialogs/bookmarks.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/dialogs/bookmarks.cpp b/modules/gui/qt/dialogs/bookmarks.cpp
index cfc7e7c233..3c92d32927 100644
--- a/modules/gui/qt/dialogs/bookmarks.cpp
+++ b/modules/gui/qt/dialogs/bookmarks.cpp
@@ -244,11 +244,11 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
     {
         fields = item->text( column ).split( ":", QString::SkipEmptyParts );
         if( fields.count() == 1 )
-            p_seekpoint->i_time_offset = CLOCK_FREQ * ( fields[0].toFloat() );
+            p_seekpoint->i_time_offset = vlc_tick_from_sec( fields[0].toFloat() );
         else if( fields.count() == 2 )
             p_seekpoint->i_time_offset = CLOCK_FREQ * ( fields[0].toInt() * 60 + fields[1].toInt() );
         else if( fields.count() == 3 )
-            p_seekpoint->i_time_offset = CLOCK_FREQ * ( fields[0].toInt() * 3600 + fields[1].toInt() * 60 + fields[2].toFloat() );
+            p_seekpoint->i_time_offset = vlc_tick_from_sec( fields[0].toInt() * 3600 + fields[1].toInt() * 60 + fields[2].toFloat() );
         else
         {
             msg_Err( p_intf, "Invalid string format for time" );



More information about the vlc-commits mailing list