* libioRIFF.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: libioRIFF.c,v 1.6 2002/05/25 16:23:07 fenrir Exp $
+ * $Id: libioRIFF.c,v 1.7 2002/06/01 12:31:58 sam Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
}
else
{
- intf_WarnMsg( 1, "input demux: cannot seek, it will take times" );
+ msg_Warn( p_input, "cannot seek, it will take times" );
if( nb < 0 ) { return( -1 ); }
i_rest = nb;
while (i_rest != 0 )
if((p_riff = malloc( sizeof(riffchunk_t))) == NULL)
{
+ msg_Err( p_input, "out of memory" );
return NULL;
}
count=input_Peek( p_input, &p_peek, 12 );
if( count < 8 )
{
+ msg_Err( p_input, "cannot peek()" );
free(p_riff);
return NULL;
}
if( ( p_riff = RIFF_ReadChunk( p_input ) ) == NULL )
{
+ msg_Err( p_input, "cannot read chunk" );
return( -1 );
}
i_len = p_riff->i_size;
if ( i_lenfather%2 !=0 ) {i_lenfather++;}
if ( p_rifffather->i_pos + i_lenfather <= p_riff->i_pos + i_len + 8 )
{
+ msg_Err( p_input, "next chunk out of bounds" );
free( p_riff );
return( 1 ); /* pas dans nos frontiere */
}
if ( __RIFF_SkipBytes( p_input,i_len + 8 ) != 0 )
{
free( p_riff );
+ msg_Err( p_input, "cannot go to the next chunk" );
return( -1 );
}
free( p_riff );
{
if ( __RIFF_SkipBytes(p_input,12) != 0)
{
+ msg_Err( p_input, "cannot go into chunk" );
return ( -1 );
}
return( 0 );
if (( __RIFF_SkipBytes(p_input,i_skip)) != 0)
{
+ msg_Err( p_input, "cannot exit from subchunk" );
return( -1 );
}
return( 0 );
RIFF_GoToChunkData(p_input);
if ( input_SplitBuffer( p_input, &p_riff->p_data, p_riff->i_size ) != p_riff->i_size )
{
+ msg_Err( p_input, "cannot read enough data " );
return ( -1 );
}
if ( p_riff->i_size%2 != 0)
if( *pp_riff == NULL )
{
+ msg_Err( p_input, "cannot retrieve header" );
return( -1 );
}
if( (*pp_riff)->i_id != FOURCC_RIFF )