[vlc-commits] demux: libmp4: fix box read size type

Francois Cartegnie git at videolan.org
Thu Jul 21 17:34:25 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 21 17:29:10 2016 +0200| [f8bcb90ca217a220b2fb946fe542a882308bcd32] | committer: Francois Cartegnie

demux: libmp4: fix box read size type

no longer an int

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

 modules/demux/mp4/libmp4.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 9aff34c..294cc5b 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1718,15 +1718,15 @@ static inline size_t mp4_box_headersize( MP4_Box_t *p_box )
     int64_t i_read = p_box->i_size; \
     if( maxread < (uint64_t)i_read ) i_read = maxread;\
     uint8_t *p_peek, *p_buff; \
-    int i_actually_read; \
+    ssize_t i_actually_read; \
     if( !( p_peek = p_buff = malloc( i_read ) ) ) \
     { \
         return( 0 ); \
     } \
     i_actually_read = stream_Read( p_stream, p_peek, i_read ); \
-    if( i_actually_read < 0 || (int64_t)i_actually_read < i_read )\
+    if( i_actually_read < 0 || i_actually_read < i_read )\
     { \
-        msg_Warn( p_stream, "MP4_READBOX_ENTER: I got %i bytes, "\
+        msg_Warn( p_stream, "MP4_READBOX_ENTER: I got %zd bytes, "\
         "but I requested %" PRId64, i_actually_read, i_read );\
         free( p_buff ); \
         return( 0 ); \



More information about the vlc-commits mailing list