Fixed a bunch of warning because of stream_Peek change.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 20 Jul 2007 19:45:21 +0000 (19:45 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 20 Jul 2007 19:45:21 +0000 (19:45 +0000)
modules/demux/asf/asf.c
modules/demux/asf/libasf.c
modules/demux/asf/libasf.h
modules/demux/mp4/libmp4.c

index bef1b78..ece221f 100644 (file)
@@ -108,7 +108,7 @@ static int Open( vlc_object_t * p_this )
     demux_t     *p_demux = (demux_t *)p_this;
     demux_sys_t *p_sys;
     guid_t      guid;
-    uint8_t     *p_peek;
+    const uint8_t     *p_peek;
 
     /* A little test to see if it could be a asf stream */
     if( stream_Peek( p_demux->s, &p_peek, 16 ) < 16 ) return VLC_EGENERIC;
@@ -141,7 +141,7 @@ static int Demux( demux_t *p_demux )
 
     for( ;; )
     {
-        uint8_t *p_peek;
+        const uint8_t *p_peek;
         mtime_t i_length;
         mtime_t i_time_begin = GetMoviePTS( p_sys );
         int i_result;
@@ -355,7 +355,7 @@ static int DemuxPacket( demux_t *p_demux )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
     int         i_data_packet_min = p_sys->p_fp->i_min_data_packet_size;
-    uint8_t     *p_peek;
+    const uint8_t *p_peek;
     int         i_skip;
 
     int         i_packet_size_left;
index 943c638..3cb42f3 100644 (file)
@@ -50,7 +50,7 @@ static int ASF_ReadObject( stream_t *, asf_object_t *,  asf_object_t * );
 /****************************************************************************
  * GUID functions
  ****************************************************************************/
-void ASF_GetGUID( guid_t *p_guid, uint8_t *p_data )
+void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data )
 {
     p_guid->v1 = GetDWLE( p_data );
     p_guid->v2 = GetWLE( p_data + 4);
@@ -76,7 +76,7 @@ int ASF_CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 )
 static int ASF_ReadObjectCommon( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_common_t *p_common = (asf_object_common_t*)p_obj;
-    uint8_t             *p_peek;
+    const uint8_t *p_peek;
 
     if( stream_Peek( s, &p_peek, 24 ) < 24 )
     {
@@ -140,7 +140,7 @@ static int  ASF_ReadObject_Header( stream_t *s, asf_object_t *p_obj )
     asf_object_header_t *p_hdr = (asf_object_header_t*)p_obj;
     asf_object_t        *p_subobj;
     int                 i_peek;
-    uint8_t             *p_peek;
+    const uint8_t       *p_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek, 30 ) ) < 30 )
     {
@@ -186,7 +186,7 @@ static int ASF_ReadObject_Data( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_data_t *p_data = (asf_object_data_t*)p_obj;
     int               i_peek;
-    uint8_t           *p_peek;
+    const uint8_t     *p_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek, 50 ) ) < 50 )
     {
@@ -211,8 +211,8 @@ static int ASF_ReadObject_Data( stream_t *s, asf_object_t *p_obj )
 static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_index_t *p_index = (asf_object_index_t*)p_obj;
-    uint8_t            *p_peek;
-    int                i;
+    const uint8_t      *p_peek;
+    int                 i;
 
     if( stream_Peek( s, &p_peek, p_index->i_object_size ) <
         (int)p_index->i_object_size )
@@ -265,8 +265,8 @@ static void ASF_FreeObject_Index( asf_object_t *p_obj )
 static int ASF_ReadObject_file_properties( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_file_properties_t *p_fp = (asf_object_file_properties_t*)p_obj;
-    int      i_peek;
-    uint8_t  *p_peek;
+    int           i_peek;
+    const uint8_t *p_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek,  104) ) < 104 )
     {
@@ -322,7 +322,7 @@ static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj )
         (asf_object_metadata_t *)p_obj;
 
     int i_peek, i_entries, i;
-    uint8_t *p_peek;
+    const uint8_t *p_peek;
 #ifdef ASF_DEBUG
     unsigned int j;
 #endif
@@ -444,7 +444,7 @@ static int ASF_ReadObject_header_extension( stream_t *s, asf_object_t *p_obj )
     asf_object_header_extension_t *p_he =
         (asf_object_header_extension_t *)p_obj;
     int     i_peek;
-    uint8_t *p_peek;
+    const uint8_t *p_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek, p_he->i_object_size ) ) <  46)
     {
@@ -508,8 +508,8 @@ static int ASF_ReadObject_stream_properties( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_stream_properties_t *p_sp =
                     (asf_object_stream_properties_t*)p_obj;
-    size_t   i_peek;
-    uint8_t *p_peek;
+    size_t        i_peek;
+    const uint8_t *p_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek,  p_sp->i_object_size ) ) < 78 )
     {
@@ -601,7 +601,7 @@ static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj )
 {
     asf_object_codec_list_t *p_cl = (asf_object_codec_list_t*)p_obj;
     int     i_peek;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
 
     unsigned int i_codec;
 
@@ -710,7 +710,7 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
 {
     asf_object_content_description_t *p_cd =
         (asf_object_content_description_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek, i_title, i_artist, i_copyright, i_description, i_rating;
     vlc_iconv_t cd = (vlc_iconv_t)-1;
     const char *ib = NULL;
@@ -784,7 +784,7 @@ static int ASF_ReadObject_language_list(stream_t *s, asf_object_t *p_obj)
 {
     asf_object_language_list_t *p_ll =
         (asf_object_language_list_t*)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek;
     int i;
 
@@ -843,7 +843,7 @@ static int ASF_ReadObject_stream_bitrate_properties( stream_t *s,
 {
     asf_object_stream_bitrate_properties_t *p_sb =
         (asf_object_stream_bitrate_properties_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek;
     int i;
 
@@ -882,7 +882,7 @@ static int ASF_ReadObject_extended_stream_properties( stream_t *s,
 {
     asf_object_extended_stream_properties_t *p_esp =
         (asf_object_extended_stream_properties_t*)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek, i;
 
     if( ( i_peek = stream_Peek( s, &p_peek, p_esp->i_object_size ) ) < 88 )
@@ -1007,7 +1007,7 @@ static int ASF_ReadObject_advanced_mutual_exclusion( stream_t *s,
 {
     asf_object_advanced_mutual_exclusion_t *p_ae =
         (asf_object_advanced_mutual_exclusion_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek;
     int i;
 
@@ -1049,7 +1049,7 @@ static int ASF_ReadObject_stream_prioritization( stream_t *s,
 {
     asf_object_stream_prioritization_t *p_sp =
         (asf_object_stream_prioritization_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek;
     int i;
 
@@ -1094,7 +1094,7 @@ static int ASF_ReadObject_extended_content_description( stream_t *s,
 {
     asf_object_extended_content_description_t *p_ec =
         (asf_object_extended_content_description_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek, *p_data;
     int i_peek;
     int i;
 
@@ -1204,7 +1204,8 @@ static int ASF_ReadObject_XXX(stream_t *s, asf_object_t *p_obj)
 {
     asf_object_XXX_t *p_XX =
         (asf_object_XXX_t *)p_obj;
-    uint8_t *p_peek, *p_data;
+    const uint8_t *p_peek;
+    uint8_t *p_data;
     int i_peek;
 
     if( ( i_peek = stream_Peek( s, &p_peek, p_XX->i_object_size ) ) < XXX )
index 6f65689..0be2f20 100644 (file)
@@ -449,7 +449,7 @@ typedef union asf_object_u
 } asf_object_t;
 
 
-void ASF_GetGUID( guid_t *p_guid, uint8_t *p_data );
+void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data );
 int  ASF_CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 );
 
 asf_object_root_t *ASF_ReadObjectRoot( stream_t *, int b_seekable );
index f9159c9..5c47fc9 100644 (file)
 
 */
 
-static uint32_t Get24bBE( uint8_t *p )
+static uint32_t Get24bBE( const uint8_t *p )
 {
     return( ( p[0] <<16 ) + ( p[1] <<8 ) + p[2] );
 }
 
-static void GetUUID( UUID_t *p_uuid, uint8_t *p_buff )
+static void GetUUID( UUID_t *p_uuid, const uint8_t *p_buff )
 {
     memcpy( p_uuid, p_buff, 16 );
 }
@@ -165,7 +165,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father );
 int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
 {
     int      i_read;
-    uint8_t  *p_peek;
+    const uint8_t  *p_peek;
 
     if( ( ( i_read = stream_Peek( p_stream, &p_peek, 32 ) ) < 8 ) )
     {
@@ -315,7 +315,7 @@ static int MP4_ReadBoxSkip( stream_t *p_stream, MP4_Box_t *p_box )
         p_box->p_father->i_type == VLC_FOURCC( 'r', 'o', 'o', 't' ) &&
         p_box->i_type == FOURCC_free )
     {
-        uint8_t *p_peek;
+        const uint8_t *p_peek;
         int     i_read;
         vlc_fourcc_t i_fcc;