[vlc-commits] qt:chromaprint: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 12:16:39 2018 +0200| [51dda48534fe3ae30d9d1f495a0aa19bbf606092] | committer: Steve Lhomme

qt:chromaprint: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

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

 modules/gui/qt/adapters/chromaprint.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/adapters/chromaprint.cpp b/modules/gui/qt/adapters/chromaprint.cpp
index 1f24006698..585fc5e167 100644
--- a/modules/gui/qt/adapters/chromaprint.cpp
+++ b/modules/gui/qt/adapters/chromaprint.cpp
@@ -57,7 +57,7 @@ bool Chromaprint::enqueue( input_item_t *p_item )
     fingerprint_request_t *p_r = fingerprint_request_New( p_item );
     if ( ! p_r ) return false;
     vlc_tick_t t = input_item_GetDuration( p_item );
-    if ( t ) p_r->i_duration = (unsigned int) ( t / CLOCK_FREQ );
+    if ( t != 0 ) p_r->i_duration = (unsigned int) SEC_FROM_VLC_TICK( t );
     if( p_fingerprinter->pf_enqueue( p_fingerprinter, p_r ) != 0 )
     {
         fingerprint_request_Delete( p_r );



More information about the vlc-commits mailing list