[vlc-devel] Re: CVS Commit (sigmunau)

Laurent Aimar fenrir at via.ecp.fr
Sat Feb 22 19:18:23 CET 2003

On Sat, Feb 22, 2003, Sigmund Augdal wrote:
> >  Fixed seme seeking issues with http access module, 
> The code previously used for seeking was
>     p_input->pf_seek( p_input, p_pos->i_size + i_size2 );
>     input_AccessReinit( p_input );
> which worked fine with the file input but did not work with http. Changing
> it to
>     input_AccessReinit( p_input );
>     p_input->pf_seek( p_input, p_pos->i_size + i_size2 );

 If you have a look at src/input/input_ext-plugins.c :
"input_AccessReinit: reinit structures after a random seek"

 So the first way seems the good one (at least input_AccessReinit was 
designed to be used after pf_seek), and it's used this way in input.c at 

 But the first method won't work with http because when you call pf_seek, http 
access fill itself buffer with input_FillBuffer (used to skip/read http header
answer). So when you call input_AccessReinit after pf_seek, you loose all data
previously buffered. (file/udp/... don't call input_FillBuffer themselves)

 The reverse order seems ok for both file and http, perhaps we should reverse the 
calling order every where, and change documentation, anyone against ?


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list