[vlc-devel] [PATCH 06/11] demux: wav: change data_pos sign

Thomas Guillem thomas at gllm.fr
Thu Mar 12 15:05:47 CET 2020


Use the same type than vlc_stream_Tell().
---
 modules/demux/wav.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index c8829648730..5997a3c1865 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -46,7 +46,7 @@ typedef struct
     es_format_t     fmt;
     es_out_id_t     *p_es;
 
-    int64_t         i_data_pos;
+    uint64_t        i_data_pos;
     int64_t         i_data_size;
 
     unsigned int    i_frame_size;
@@ -594,7 +594,8 @@ static int Open( vlc_object_t * p_this )
     if( !b_is_rf64 || i_size < UINT32_MAX )
     {
         int64_t i_stream_size = stream_Size( p_demux->s );
-        if( i_stream_size > 0 && i_stream_size >= i_size + p_sys->i_data_pos )
+        if( i_stream_size > 0
+         && (uint64_t) i_stream_size >= i_size + p_sys->i_data_pos )
             p_sys->i_data_size = i_size;
     }
 
-- 
2.20.1



More information about the vlc-devel mailing list