[vlc-commits] audiotrack: avoid cast, use proper type

Thomas Guillem git at videolan.org
Tue Dec 1 12:16:14 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 23 17:17:50 2020 +0100| [9d7e1825bec9e86729fff955878551632f1e6108] | committer: Thomas Guillem

audiotrack: avoid cast, use proper type

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

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

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 0c09f35d4e..3610680412 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -98,7 +98,7 @@ typedef struct
 
     /* Used by AudioTrack_getPlaybackHeadPosition */
     struct {
-        uint32_t i_wrap_count;
+        uint64_t i_wrap_count;
         uint32_t i_last;
     } headpos;
 
@@ -596,7 +596,7 @@ AudioTrack_getPlaybackHeadPosition( JNIEnv *env, audio_output_t *p_aout )
     if( p_sys->headpos.i_last > i_pos )
         p_sys->headpos.i_wrap_count++;
     p_sys->headpos.i_last = i_pos;
-    return p_sys->headpos.i_last + ((uint64_t)p_sys->headpos.i_wrap_count << 32);
+    return p_sys->headpos.i_last + (p_sys->headpos.i_wrap_count << 32);
 }
 
 /**



More information about the vlc-commits mailing list