[vlc-commits] demux: flac: signedness fixes

Francois Cartegnie git at videolan.org
Fri Feb 10 12:12:59 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 10 11:58:28 2017 +0100| [1fd2cd3a4b5489cde3e7e33cccdd664bf20d32c5] | committer: Francois Cartegnie

demux: flac: signedness fixes

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

 modules/demux/flac.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index b457500..8a2df0f 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -506,15 +506,15 @@ static inline int Get24bBE( const uint8_t *p )
 }
 
 static void ParseStreamInfo( es_format_t *, uint64_t *pi_count );
-static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
-                            int i_sample_rate );
-static void ParseComment( demux_t *, const uint8_t *p_data, int i_data );
-static void ParsePicture( demux_t *, const uint8_t *p_data, int i_data );
+static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, size_t i_data,
+                            unsigned i_sample_rate );
+static void ParseComment( demux_t *, const uint8_t *p_data, size_t i_data );
+static void ParsePicture( demux_t *, const uint8_t *p_data, size_t i_data );
 
 static int  ParseHeaders( demux_t *p_demux, es_format_t *p_fmt )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
-    int     i_peek;
+    ssize_t i_peek;
     const uint8_t *p_peek;
     bool b_last;
     uint64_t i_sample_count;
@@ -614,14 +614,14 @@ static void ParseStreamInfo( es_format_t *p_fmt, uint64_t *pi_count )
     *pi_count = GetQWBE(&p_data[4+6]) &  ((INT64_C(1)<<36)-1);
 }
 
-static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
-                            int i_sample_rate )
+static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, size_t i_data,
+                            unsigned i_sample_rate )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
     flac_seekpoint_t *s;
-    int i;
+    size_t i;
 
-    if( i_sample_rate <= 0 )
+    if( i_sample_rate == 0 )
         return;
 
     /* */
@@ -656,7 +656,7 @@ static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
     /* TODO sort it by size and remove wrong seek entry (time not increasing) */
 }
 
-static void ParseComment( demux_t *p_demux, const uint8_t *p_data, int i_data )
+static void ParseComment( demux_t *p_demux, const uint8_t *p_data, size_t i_data )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
 
@@ -669,7 +669,7 @@ static void ParseComment( demux_t *p_demux, const uint8_t *p_data, int i_data )
         &p_sys->i_title_seekpoints, &p_sys->pp_title_seekpoints, NULL, NULL );
 }
 
-static void ParsePicture( demux_t *p_demux, const uint8_t *p_data, int i_data )
+static void ParsePicture( demux_t *p_demux, const uint8_t *p_data, size_t i_data )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
 



More information about the vlc-commits mailing list