[vlc-commits] demux: asf: fix signedness on stream prioritization

Francois Cartegnie git at videolan.org
Sat Dec 7 20:04:22 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec  7 19:55:53 2013 +0100| [803def84f65ab570ce2d3b20e135b53fac07c2ea] | committer: Francois Cartegnie

demux: asf: fix signedness on stream prioritization

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

 modules/demux/asf/libasf.c |    8 ++++----
 modules/demux/asf/libasf.h |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index 0520ae4..8b65635 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -1052,7 +1052,7 @@ static int ASF_ReadObject_stream_prioritization( stream_t *s,
     asf_object_stream_prioritization_t *p_sp = &p_obj->stream_prioritization;
     const uint8_t *p_peek, *p_data;
     int i_peek;
-    int i;
+    uint16_t i;
 
     if( ( i_peek = stream_Peek( s, &p_peek, p_sp->i_object_size ) ) < 26 )
        return VLC_EGENERIC;
@@ -1061,9 +1061,9 @@ static int ASF_ReadObject_stream_prioritization( stream_t *s,
 
     p_sp->i_priority_count = ASF_READ2();
 
-    p_sp->pi_priority_flag = calloc( p_sp->i_priority_count, sizeof(int) );
+    p_sp->pi_priority_flag = calloc( p_sp->i_priority_count, sizeof(uint16_t) );
     p_sp->pi_priority_stream_number =
-                             calloc( p_sp->i_priority_count, sizeof(int) );
+                             calloc( p_sp->i_priority_count, sizeof(uint16_t) );
 
     if( !p_sp->pi_priority_flag || !p_sp->pi_priority_stream_number )
     {
@@ -1084,7 +1084,7 @@ static int ASF_ReadObject_stream_prioritization( stream_t *s,
 #ifdef ASF_DEBUG
     msg_Dbg( s, "read \"stream prioritization object\"" );
     for( i = 0; i < p_sp->i_priority_count; i++ )
-        msg_Dbg( s, "  - Stream:%d flags=0x%x",
+        msg_Dbg( s, "  - Stream:%u flags=0x%x",
                  p_sp->pi_priority_stream_number[i],
                  p_sp->pi_priority_flag[i] );
 #endif
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index ccb1f94..23ee3ca 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -311,9 +311,9 @@ typedef struct
 {
     ASF_OBJECT_COMMON
 
-    int i_priority_count;
-    int *pi_priority_flag;
-    int *pi_priority_stream_number;
+    uint16_t i_priority_count;
+    uint16_t *pi_priority_flag;
+    uint16_t *pi_priority_stream_number;
 } asf_object_stream_prioritization_t;
 
 typedef struct



More information about the vlc-commits mailing list