[vlc-commits] qt: Fix duration conversion

Hugo Beauzée-Luyssen git at videolan.org
Fri May 24 14:00:48 CEST 2019


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Apr 17 14:03:12 2019 +0200| [3ffd6408bcf5c0e47e37a2d0ad16d7a8e23cf2a7] | committer: Hugo Beauzée-Luyssen

qt: Fix duration conversion

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

 modules/gui/qt/components/mediacenter/mlalbum.cpp      | 2 +-
 modules/gui/qt/components/mediacenter/mlalbumtrack.cpp | 2 +-
 modules/gui/qt/components/mediacenter/mlvideo.cpp      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/components/mediacenter/mlalbum.cpp b/modules/gui/qt/components/mediacenter/mlalbum.cpp
index 9dd7fdc2a4..271133f8f8 100644
--- a/modules/gui/qt/components/mediacenter/mlalbum.cpp
+++ b/modules/gui/qt/components/mediacenter/mlalbum.cpp
@@ -32,7 +32,7 @@ MLAlbum::MLAlbum(vlc_medialibrary_t* _ml, const vlc_ml_album_t *_data, QObject *
     assert( _data );
     assert( _ml );
 
-    int t_sec = _data->i_duration / 1000000;
+    int t_sec = _data->i_duration / 1000;
     int sec = t_sec % 60;
     int min = (t_sec / 60) % 60;
     int hour = t_sec / 3600;
diff --git a/modules/gui/qt/components/mediacenter/mlalbumtrack.cpp b/modules/gui/qt/components/mediacenter/mlalbumtrack.cpp
index 00706aa72f..63bca77d90 100644
--- a/modules/gui/qt/components/mediacenter/mlalbumtrack.cpp
+++ b/modules/gui/qt/components/mediacenter/mlalbumtrack.cpp
@@ -30,7 +30,7 @@ MLAlbumTrack::MLAlbumTrack(vlc_medialibrary_t* _ml, const vlc_ml_media_t *_data,
     assert( _data );
     assert( _data->i_type == VLC_ML_MEDIA_TYPE_AUDIO );
 
-    int t_sec = _data->i_duration / 1000000;
+    int t_sec = _data->i_duration / 1000;
     int sec = t_sec % 60;
     int min = (t_sec / 60) % 60;
     int hour = t_sec / 3600;
diff --git a/modules/gui/qt/components/mediacenter/mlvideo.cpp b/modules/gui/qt/components/mediacenter/mlvideo.cpp
index 8b73a90581..84190f6ad7 100644
--- a/modules/gui/qt/components/mediacenter/mlvideo.cpp
+++ b/modules/gui/qt/components/mediacenter/mlvideo.cpp
@@ -37,7 +37,7 @@ MLVideo::MLVideo(vlc_medialibrary_t* ml, const vlc_ml_media_t* data, QObject* pa
 {
     assert( data->i_type == VLC_ML_MEDIA_TYPE_VIDEO );
 
-    int t_sec = data->i_duration / 1000000;
+    int t_sec = data->i_duration / 1000;
     int sec = t_sec % 60;
     int min = (t_sec / 60) % 60;
     int hour = t_sec / 3600;



More information about the vlc-commits mailing list