]> git.sesse.net Git - vlc/commitdiff
libasf.c: clean up + maybe a bug fix.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 16 Nov 2004 10:01:22 +0000 (10:01 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 16 Nov 2004 10:01:22 +0000 (10:01 +0000)
modules/demux/asf/libasf.c

index 3e006f64cf18a79f67f90f48c6a959ff6959e44d..091e2cf08d6e8e28f0c63b9e2766d237baba9b2e 100644 (file)
@@ -888,6 +888,7 @@ static int ASF_ReadObject_extended_stream_properties( stream_t *s,
         p_data += 16+2+4+i_size;
     }
 
+    p_esp->p_sp = NULL;
     if( p_data < &p_peek[i_peek] )
     {
         asf_object_t *p_sp;
@@ -948,10 +949,6 @@ static void ASF_FreeObject_extended_stream_properties( asf_object_t *p_obj)
 }
 
 
-    guid_t  type;
-    int16_t i_stream_number_count;
-    int16_t *pi_stream_number;
-
 static int ASF_ReadObject_advanced_mutual_exclusion( stream_t *s,
                                                      asf_object_t *p_obj)
 {
@@ -1231,7 +1228,10 @@ static int ASF_ReadObject( stream_t *s, asf_object_t *p_obj,
     int i_result;
     int i_index;
 
-    if( !p_obj ) return( 0 );
+    if( !p_obj )
+        return( 0 );
+
+    memset( p_obj, 0, sizeof( p_obj ) );
 
     if( ASF_ReadObjectCommon( s, p_obj ) )
     {