]> git.sesse.net Git - vlc/commitdiff
ASF: Do not use stream_Read with a NULL buffer
authorRafaël Carré <funman@videolan.org>
Fri, 6 Jun 2008 09:54:50 +0000 (11:54 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 6 Jun 2008 09:54:50 +0000 (11:54 +0200)
modules/demux/asf/asf.c
modules/demux/asf/libasf.c

index b23c78a85f1d5820b70eaf4fbe1d7236006a5f1a..15f82d4738b191ed1f1630ced9294bf660411829 100644 (file)
@@ -637,8 +637,9 @@ static int DemuxPacket( demux_t *p_demux )
             msg_Warn( p_demux, "Read %d too much bytes in the packet",
                             i_packet_padding_length - i_packet_size_left );
 #endif
-        if( stream_Read( p_demux->s, NULL, i_packet_size_left )
-                                                         < i_packet_size_left )
+        if( stream_Seek( p_demux->s,
+                stream_Tell( p_demux->s ) + i_packet_size_left )
+            != VLC_SUCCESS)
         {
             msg_Err( p_demux, "cannot skip data, EOF ?" );
             return 0;
index 74a7ca9b608b3447e2982194fb21754e54c12110..4e97394621d17ea66873b5de9b4f82449c8dca34 100644 (file)
@@ -479,7 +479,7 @@ static int ASF_ReadObject_header_extension( stream_t *s, asf_object_t *p_obj )
     if( !p_he->i_header_extension_size ) return VLC_SUCCESS;
 
     /* Read the extension objects */
-    stream_Read( s, NULL, 46 );
+    stream_Seek( s, stream_Tell( s ) + 46 );
     for( ; ; )
     {
         asf_object_t *p_obj = malloc( sizeof( asf_object_t ) );