Changeset ac217da0399df26771fec3005f4faaa65a2eb34b

Show
Ignore:
Timestamp:
07/03/08 22:51:05 (2 months ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1215118265 +0000
git-parent:

[58766eae93336caaf0113e76900900a7a274bd05]

git-author:
Laurent Aimar <fenrir@videolan.org> 1215118184 +0000
Message:

Fixed AStreamSeekBlock. When skipping data, the position may not be the
requested one. (Breaking at least mapped file input).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/stream.c

    rfd2c554 rac217da  
    996996    else 
    997997    { 
    998         /* Read enough data */ 
    999         while( p_sys->block.i_start + p_sys->block.i_size < i_pos ) 
    1000         { 
     998        do 
     999        { 
     1000            /* Read and skip enough data */ 
    10011001            if( AStreamRefillBlock( s ) ) 
    10021002                return VLC_EGENERIC; 
    10031003 
    10041004            while( p_sys->block.p_current && 
    1005                    p_sys->i_pos + p_sys->block.p_current->i_buffer < i_pos ) 
     1005                   p_sys->i_pos + p_sys->block.p_current->i_buffer - p_sys->block.i_offset < i_pos ) 
    10061006            { 
    1007                 p_sys->i_pos += p_sys->block.p_current->i_buffer
     1007                p_sys->i_pos += p_sys->block.p_current->i_buffer - p_sys->block.i_offset
    10081008                p_sys->block.p_current = p_sys->block.p_current->p_next; 
     1009                p_sys->block.i_offset = 0; 
    10091010            } 
    10101011        } 
     1012        while( p_sys->block.i_start + p_sys->block.i_size < i_pos ); 
    10111013 
    10121014        p_sys->block.i_offset = i_pos - p_sys->i_pos;