[vlc-commits] audiotrack: convert the JNI nanoseconds to ticks using VLC_TICK_FROM_NS()

Steve Lhomme git at videolan.org
Tue Jul 3 15:30:56 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul  3 15:24:13 2018 +0200| [fb06bbe4dbac61e53c95bf7bb66cd0588c006ea1] | committer: Steve Lhomme

audiotrack: convert the JNI nanoseconds to ticks using VLC_TICK_FROM_NS()

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

 modules/audio_output/audiotrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index b33b2e9581..d32c1a5904 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -686,7 +686,7 @@ AudioTrack_GetTimestampPositionUs( JNIEnv *env, audio_output_t *p_aout )
 
         if( JNI_AT_CALL_BOOL( getTimestamp, p_sys->timestamp.p_obj ) )
         {
-            p_sys->timestamp.i_frame_us = JNI_AUDIOTIMESTAMP_GET_LONG( nanoTime ) / 1000;
+            p_sys->timestamp.i_frame_us = VLC_TICK_FROM_NS(JNI_AUDIOTIMESTAMP_GET_LONG( nanoTime ));
             p_sys->timestamp.i_frame_pos = JNI_AUDIOTIMESTAMP_GET_LONG( framePosition );
         }
         else



More information about the vlc-commits mailing list