[vlc-commits] crystalhd: convert to/from vlc_tick_t using MSFTIME

Steve Lhomme git at videolan.org
Thu Sep 20 12:44:00 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu May 31 13:50:25 2018 +0200| [df07e434dd8b6212ad4faa30faeb8a2afb897ade] | committer: Steve Lhomme

crystalhd: convert to/from vlc_tick_t using MSFTIME

Since it's in 100ns

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

 modules/codec/crystalhd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/crystalhd.c b/modules/codec/crystalhd.c
index cc11eedcda..5fab036989 100644
--- a/modules/codec/crystalhd.c
+++ b/modules/codec/crystalhd.c
@@ -73,8 +73,8 @@
 #include <assert.h>
 
 /* BC pts are multiple of 100ns */
-#define TO_BC_PTS( a ) ( a * 10 + 1 )
-#define FROM_BC_PTS( a ) ((a - 1) /10)
+#define TO_BC_PTS( a )   ( MSFTIME_FROM_VLC_TICK(a) + 1 )
+#define FROM_BC_PTS( a ) VLC_TICK_FROM_MSFTIME(a - 1)
 
 //#define DEBUG_CRYSTALHD 1
 



More information about the vlc-commits mailing list