[vlc-devel] commit: ASF: Do not use stream_Read with a NULL buffer ( Rafaël Carré )
git version control
git at videolan.org
Fri Jun 6 11:53:20 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Jun 6 11:54:50 2008 +0200| [77a7babe4a2e4391ec33bf690fb1abecd28cbb74]
ASF: Do not use stream_Read with a NULL buffer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77a7babe4a2e4391ec33bf690fb1abecd28cbb74
---
modules/demux/asf/asf.c | 5 +++--
modules/demux/asf/libasf.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index b23c78a..15f82d4 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -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;
diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index 74a7ca9..4e97394 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -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 ) );
More information about the vlc-devel
mailing list